Skip to main content

Module postprocess

Module postprocess 

Source
Expand description

Markdown post-processing pipeline (R1).

Applies a series of text transformations to improve markdown quality:

  • Unicode normalization (non-breaking spaces, curly quotes, dashes)
  • LaTeX formula spacing fixes for GitHub rendering
  • Bold formatting cleanup
  • Percent sign fix for GitHub KaTeX

Based on reference implementation from: https://github.com/link-foundation/meta-theory/blob/main/scripts/download-article.mjs

Structs§

PostProcessOptions
Options for post-processing.

Functions§

apply_bold_formatting_fixes
Clean up bold formatting artifacts from HTML-to-markdown conversion.
apply_latex_spacing_fixes
Fix spacing around inline LaTeX formulas for GitHub rendering.
apply_percent_sign_fix
Fix percent sign in inline formulas for GitHub KaTeX rendering.
apply_unicode_normalization
Normalize unicode characters for consistent rendering.
post_process_markdown
Apply all post-processing transformations to markdown text.