Skip to content

Having troubles parsing Markdown with some plugins #164

Answered by ChristianMurphy
kvietcong asked this question in Q&A
Discussion options

You must be logged in to vote

There's a distinction between parser plugins and transformer plugins.
Transformer plugins work on an AST, and run in the order they are called with .use().
Parser plugins work on the raw source text, always run at the beginning of the pipeline (even if they are listed later), and need to be in the same flow as remark-parse.

The remark plugins you are having issues with remark-footnotes, remark-math, and remark-gfm are parser plugins.
The need to be moved into the same flow/pipeline as remark-parse https://github.com/kvietcong/le-atlas/blob/7ce8090c5d21d002173a46cec4feb852f7489376/utils/parsing.js#L51

Anything that adds a new type of syntax to markdown, is most likely a parser plugin.
Almo…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kvietcong
Comment options

Answer selected by kvietcong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
🗄 area/interface This affects the public interface
2 participants