Skip to content

✨ feat(markdown): improve Markdown to HTML conversion with full GFM and math support#1816

Merged
harehare merged 1 commit into
mainfrom
feat/improve-markdown-to-html
Jun 1, 2026
Merged

✨ feat(markdown): improve Markdown to HTML conversion with full GFM and math support#1816
harehare merged 1 commit into
mainfrom
feat/improve-markdown-to-html

Conversation

@harehare

@harehare harehare commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Switch Markdown::to_html and the standalone to_html helper from markdown::to_html (CommonMark only) to markdown::to_html_with_options using the same construct set that is already used during parsing.

Elements now rendered correctly:
- GFM tables        → <table> / <thead> / <tbody> / <th> / <td>
- GFM task lists    → <input type="checkbox"> (checked / unchecked)
- GFM strikethrough → <del>
- GFM footnotes     → proper footnote anchors and back-links
- GFM autolink literals
- Inline math ($…$) → <code class="language-math math-inline">
- Block math ($$…$$) → <pre><code class="language-math math-display">
- Raw HTML in Markdown (e.g. <kbd>, <u>) passes through via allow_dangerous_html

Add comprehensive tests for each newly supported construct.

…nd math support

Switch `Markdown::to_html` and the standalone `to_html` helper from
`markdown::to_html` (CommonMark only) to `markdown::to_html_with_options`
using the same construct set that is already used during parsing.

Elements now rendered correctly:
- GFM tables        → <table> / <thead> / <tbody> / <th> / <td>
- GFM task lists    → <input type="checkbox"> (checked / unchecked)
- GFM strikethrough → <del>
- GFM footnotes     → proper footnote anchors and back-links
- GFM autolink literals
- Inline math ($…$) → <code class="language-math math-inline">
- Block math ($$…$$) → <pre><code class="language-math math-display">
- Raw HTML in Markdown (e.g. <kbd>, <u>) passes through via allow_dangerous_html

Add comprehensive tests for each newly supported construct.
@harehare harehare merged commit abf73e7 into main Jun 1, 2026
8 checks passed
@harehare harehare deleted the feat/improve-markdown-to-html branch June 1, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant