pandoc
pandoc copied to clipboard
Support for Github "Alerts"
Describe your proposed improvement and the problem it solves. Seems this (great) tool does not render Github Markdown "alerts", as Github does.
Pandocs rendering
Githubs rendering
For this markdown:
> [!CAUTION]
> You **MUST** use the Rust programming language.
Using command:
pandoc --from=gfm --to=pdf -o PANDOC.pdf README.md
Would be nice to get the same kind of appearance as Github Markdown uses.
Describe alternatives you've considered. N/A
This is perhaps a duplicate of https://github.com/jgm/pandoc/issues/9716
No, it's not a duplicate of #9716, which concerns pandoc's markdown and not gfm. GitHub alerts are supported in gfm.
pandoc -f gfm -t native
> [!CAUTION]
> You **MUST** use the Rust programming language.
^D
[ Div
( "" , [ "caution" ] , [] )
[ Div ( "" , [ "title" ] , [] ) [ Para [ Str "Caution" ] ]
, Para
[ Str "You"
, Space
, Strong [ Str "MUST" ]
, Space
, Str "use"
, Space
, Str "the"
, Space
, Str "Rust"
, Space
, Str "programming"
, Space
, Str "language."
]
]
]
The issue is that the writers don't by default do any special styling for this structure. See #9821 for a filter that may help with PDF output.
For background see also https://github.com/jgm/commonmark-hs/issues/132#issuecomment-1856751436