Skip to content

Missing support for subscripts and superscripts in GitHub-flavored Markdown (GFM) #9075

Open
@thilomaurer

Description

@thilomaurer

Converting subscripts and superscripts from GFM to any fails with the exception of HTML as target.
Is seems the tags <sub> and <sup> are not properly parsed into the AST, as can be seen below for the native target.

GFM input gfm.md

foo<sub>14:13</sub>bar

Exsamples:

  • LaTeX (bad result)
    $ podman run --rm --volume "$(pwd):/data:Z" pandoc/core -f gfm gfm.md -t latex
    foo14:13bar
    
  • pandoc-Markdown (bad result)
    $ podman run --rm --volume "$(pwd):/data:Z" pandoc/core -f gfm gfm.md -t Markdown
    foo`<sub>`{=html}14:13`</sub>`{=html}bar
    
  • HTML (good result)
    $ podman run --rm --volume "$(pwd):/data:Z" pandoc/core -f gfm gfm.md -t html
    <p>foo<sub>14:13</sub>bar</p>
    
  • native (bad result)
    $ podman run --rm --volume "$(pwd):/data:Z" pandoc/core -f gfm gfm.md -t native
    [ Para
     [ Str "foo"
     , RawInline (Format "html") "<sub>"
     , Str "14:13"
     , RawInline (Format "html") "</sub>"
     , Str "bar"
     ]
    ]
    
    

Pandoc version

podman run --rm --volume "$(pwd):/data:Z" pandoc/core --version
pandoc 3.1.1
[...]

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions