Skip to content

GFM incompatibility with Math Curly Brace Escapes #10631

@BebeSparkelSparkel

Description

@BebeSparkelSparkel

Standard curly brace escapes in math blocks do not render correctly on github as exemplified by

$\{a,b\}$ rendered as ${a,b}$

github requires double escapes like

$\\{a,b\\}$ rendered as $\{a,b\}$

When trying to accept this as input with gfm specified it does not parse it correctly

$ echo '$\\\\{a,b\\\\}$' | pandoc -f gfm -t html
[WARNING] Could not convert TeX math \\{a,b\\}, rendering as TeX:
  \\{a,b\\}
    ^
  unexpected control sequence \\
  expecting "%", "\\label", "\\tag", "\\nonumber", whitespace or "\\allowbreak"
<p><span class="math inline">$\\{a,b\\}$</span></p>
$ pandoc --version
pandoc 3.6.3
Features: +server +lua
Scripting engine: Lua 5.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions