-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] RAW format #6800
Comments
I think this already exists and it's called Or maybe I misunderstand.. from your example seems that the proposed
a filter is not a preprocessor... |
What you are asking for is simply nonsensical. The filter system operates on the native internal AST format. What you want is a preprocessor not a filter. So just pre-process it. If you want syntax sugar try something like If your preprocessor converts to Pandoc's AST format then you can read it in as JSON or native syntax. |
Indeed what I was asking is nonsensical once understanding the philosophy around pandoc. |
BTW, on Mac and Linux you can simulate a
This will produce a single |
Thanks @alerque; I should have read more closely. 👍 |
Very close indeed to what @tarleb mentioned. |
Enhancement: Adding the raw format
Sometimes one might have to preprocess a file to make it pandoc-compatible at first.
Adding the raw format would allow to use the pandoc CLI syntax to make preprocessing like standard pandoc filtering.
Illustration
My Markdown file contains
@sinx@
which is common for AsciiMath notation.I need to parse it to render AsciiMath notation to
$:a sinx$
to use yuwash/asciimathml-pandocfilter afterwards.As
@
is a special element in pandoc-markdown, this substitution needs to be done beforehand.Currently I am using a pre-pandoc-parser, but with the added raw format doing so might become useless.
The raw format would prevent pandoc from parsing its input to its internal dialect, thus allowing filters not based on pandoc grammar necessarily.
Commands
Typing
cat file.md | pandoc -f raw -F my_pre_pandoc_parser_becoming_a_pandoc_standard_filter_now | pandoc...
rather than
cat file.md | ./my_pre_pandoc_parser | pandoc...
The text was updated successfully, but these errors were encountered: