Skip to main content

to_html_blocks

Function to_html_blocks 

Source
pub fn to_html_blocks(text: &str) -> Vec<(usize, String)>
Expand description

Like to_html, but one entry per top-level block: (line, html), where line is the 0-based index (within text) of the block’s first line. Concatenating the html parts yields exactly to_html(text). This is what lets the page anchor a comment on a rendered markdown block back to the source line the block starts at.