Skip to main content

Module fix

Module fix 

Source
Expand description

Streaming preprocessors (“fix” functions), ported one-to-one from markmend/core/src/preprocess/*.ts. Each one makes incomplete markdown syntax parseable as it streams, so the AST stays stable.

Functions§

find_footnote_refs
/\[\^[^\]\s]{1,200}\](?!:)/ — footnote references not followed by :.
fix_code
fix_delete
fix_emphasis
fix_footnote
fix_html
fix_inline_math
fix_link
fix_math
fix_strong
fix_table
fix_task_list
has_footnote_definition
has_footnote_reference
/\[\^[^\]\s]{1,200}\]/ reference (not a definition).
strip_closed_code_blocks
/```[\s\S]*?```/g — remove closed code blocks from text.
strip_inline_code
/[^\n]+`/g — remove inline code spans.