Skip to content

Docusaurus equations smoke test still skipped; pandoc 3.12.1 reintroduced single-line display math #15396

Open

Description

@cderv

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 applies trimMath and 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

  1. Update the skip message in tests/docs/smoke-all/2024/01/18/docusaurus/equations.qmd to reference Markdown: display math ending in a % comment doesn't survive a round trip (regression in 3.12.1) jgm/pandoc#12082.
  2. 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.
  3. If upstream instead declares the trim intentional: regenerate the snapshot for the single-line form and re-enable the test.

Related

Activity

  1. added
    bug
    math
    on Nov 18, 2026
  2. cderv commented on Nov 19, 2026

    @cderv
    MemberAuthor

    Upstream fixed: jgm/pandoc#12082 closed 2026-11-18 with reader-side fix — trimMath now 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.snapshot should match again. No snapshot regeneration needed unless upstream behavior changes further.

    Watch: edemaine noted a possible follow-up regression in the inline writer (addFinalNewlineIfEndsInComment treats 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdocusaurusmath

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions