Open
Labels
Description
Summary
The docusaurus equations smoke test (tests/docs/smoke-all/2024/01/18/docusaurus/equations.qmd) has been skipped since 5fcbb59 (2026-01-08) with the note "fixed in pandoc@8123be6, awaiting release". That fix shipped in Pandoc 3.9, but the test was never re-enabled — and Pandoc 3.12.1 (now bundled as 3.13 via #15320) has reintroduced the same single-line display-math output that caused the breakage, this time on the reader side.
Details
- Original episode: Pandoc 3.7 collapsed multi-line
$$…$$to a single line in Markdown output (writer side). Reported in jgm/pandoc#11384, fixed in Pandoc 3.9 (jgm/pandoc@8123be65). We skipped the equations test in the meantime (5fcbb59). - Regression: Pandoc 3.12.1 (3.12.0 unaffected) — jgm/pandoc@c248f880 ("Math: respect TeX groups and comments", Math: respect TeX groups and comments. jgm/pandoc#11887) unified display math into
mathWith, which appliestrimMathand strips the surrounding newlines the reader previously preserved. Undocumented in the changelog; still present in 3.13 and 3.14. - Already reported upstream: jgm/pandoc#12082. Maintainers agree it is a regression; a reader-side fix restoring verbatim whitespace capture for display math is the likely resolution.
So: re-enabling the test today would fail exactly as it did under Pandoc 3.7, and the skip message is stale ("awaiting release" — the referenced fix was released and later regressed).
Action items
- Update the
skipmessage intests/docs/smoke-all/2024/01/18/docusaurus/equations.qmdto reference Markdown: display math ending in a % comment doesn't survive a round trip (regression in 3.12.1) jgm/pandoc#12082. - Once a pandoc release with the reader-side fix is bundled: un-skip the test; the existing
equations.mdx.snapshot(multi-line$$) should match as-is. - If upstream instead declares the trim intentional: regenerate the snapshot for the single-line form and re-enable the test.
Related
- jgm/pandoc#12082 — upstream regression report
- jgm/pandoc#11384 — original (3.7, writer-side) report
- Update Pandoc to 3.13 #15320 — bundled Pandoc 3.10 → 3.13
- [Docusaurus] html-math-method: webtex config ignored - math rendered as tex_math_dollars #13853 — docusaurus
html-math-method: webtexignored (math emitted as$$..$$), which is why this output path matters - quarto-dev/quarto VS Code extension roundtrip snapshots hit the same change (failing job; precedent Update roundtrip snapshots pandoc 3.10 quarto#1062)
Activity
cderv commentedon Nov 19, 2026
Upstream fixed: jgm/pandoc#12082 closed 2026-11-18 with reader-side fix —
trimMathnow preserves a single leading/trailing newline in display math (jgm/pandoc@9176cbd6, 485f2db9), plus a writer-side fix for inline math ending in a comment (jgm/pandoc@f5d26605). Regression tests added upstream (test/command/12082.md).Implication for this issue: once a pandoc release containing the fix (post-3.14) is bundled, the equations smoke test can be un-skipped as-is — the existing multi-line
equations.mdx.snapshotshould match again. No snapshot regeneration needed unless upstream behavior changes further.Watch: edemaine noted a possible follow-up regression in the inline writer (
addFinalNewlineIfEndsInCommenttreats escaped\\%as a comment); if that lands in a release it may need its own check, but it does not affect the display-math path this test exercises.