fix_code_emphasis

Function fix_code_emphasis 

Source
pub fn fix_code_emphasis(lines: &[String]) -> Vec<String>
Expand description

Merge contiguous code and emphasis spans.

Groups of emphasis markers and inline code with no separating spaces are normalised so that emphasis markers wrap the entire group or are removed when they solely surround code.

ยงExamples

use mdtablefix::code_emphasis::fix_code_emphasis;
let lines = vec!["`code`**text**".to_string()];
assert_eq!(
    fix_code_emphasis(&lines),
    vec!["**`code`text**".to_string()]
);