/// Separates Obsidian's inline footnotes from the text, since cmark can't handle them.
Separates Obsidian's inline footnotes from the text, since cmark can't handle them.
Separates Obsidian ' s inline footnotes from the text since cmark can ' t handle them .
fn separate_inline_footnote(mut line: String, footnotes: &mut Vec<String>) -> String {
        for cap in INLINE_FOOTNOTE.captures_iter(&line.clone()) {
            let label = format!("[^fn-{}]", footnotes.len());
            line = line.replace(&cap[0], label.as_str());
            let footnoted = format!("{}: {}", label, &cap[1]);
            footnotes.push(footnoted);
        }
        return line;
    }
fn separate_inline_footnote ( mut line : String , footnotes : & mut Vec < String > ) -> String { for cap in INLINE_FOOTNOTE . captures_iter ( & line . clone ( ) ) { let label = format ! ( " " footnotes len ( ) ) ; line = line . replace ( & cap [ 0 ] , label . as_str ( ) ) ; let footnoted = format ! ( " " label cap [ 1 ] ) ; footnotes . push ( footnoted ) ; } return line ; }
Separates Obsidian's inline footnotes from the text, since cmark can't handle them.
Separates Obsidian ' s inline footnotes from the text since cmark can ' t handle them .
line
String
footnotes
&mut Vec<String>