How do I used Pandoc to replicate Quarto document input parsing? #11393
-
DescriptionI'm writing some tests for my project implementing Pandoc filters for Quarto. I've run into a problem in that I can't see how to replicate the Pandoc AST that Quarto generates, to simulate the input to my filters. I'm looking for some set of Pandoc input format specifiers that get as close as possible to those that Quarto is using in parsing Markdown documents such as As an example, I have a document like this: Using a null-filter, run
However, if I just use Pandoc
Notice that the backtick-code-block has not been correctly parsed to a CodeBlock. Is there some Pandoc extension or similar I can enable to get the same parsing for this simple document from Pandoc, as I do from Quarto? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Not that we're aware of. Unfortunately, this was a change from Pandoc 2 to 3 which we didn't control or advocate for. In Quarto, we use a tremendously ugly hack in a custom reader. One change I want to make in Quarto is to provide a standalone front-end reader that understands our syntax, is used internally, and is usable outside of Quarto itself. This would solve your problem, but it's a big project. I hope to be able to do it in 2025. |
Beta Was this translation helpful? Give feedback.
Not that we're aware of. Unfortunately, this was a change from Pandoc 2 to 3 which we didn't control or advocate for. In Quarto, we use a tremendously ugly hack in a custom reader.
One change I want to make in Quarto is to provide a standalone front-end reader that understands our syntax, is used internally, and is usable outside of Quarto itself. This would solve your problem, but it's a big project. I hope to be able to do it in 2025.