Skip to main content

refine

Function refine 

Source
pub fn refine(markdown: &str, options: &RefineOptions) -> String
Expand description

Refines the shape of markdown without deleting any of its visible text.

Returns markdown unchanged if it fails to parse as CommonMark. In practice pulldown-cmark accepts effectively any input as literal text rather than erroring, so this is a defensive floor — the CommonMark-preserved invariant — not an expected path.