Skip to main content

Module normalize

Module normalize 

Source
Expand description

Markdown-string input normalization โ€” the boundary preprocessing content import runs before parsing. Converts line endings to \n, strips invisible Unicode bidi controls (which sit adjacent to **/_ and defeat delimiter recognition), and repairs <!-- ... --> HTML-comment fences that would otherwise swallow trailing text.

The pure string primitive from_markdown applies at its boundary. It carries no dependency on the document engine, so this crate is a leaf quillmark-core depends on.

Functionsยง

fix_html_comment_fences
Inserts a newline after --> when followed by non-whitespace content.
normalize_markdown
Applies all markdown normalizations in order: CRLF โ†’ LF, bidi strip, HTML comment fence repair.
strip_bidi_formatting
Strips Unicode bidirectional formatting characters that can interfere with markdown parsing.