Are Marked.Lexer and Marked.Parser meant to inherit the options from Marked.use()? #3094
Unanswered
calculuschild
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Lines 233 to 239 in ba3b7e4 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This might be a dumb question. I'm trying to split the render process on my app into separate
Marked.Lexer.lex
andMarked.Parser.parse
steps. For some reason, the extensions and options I load via Marked.use only seem to apply to the Lexer. I can get a good Token tree, but the Parser crashes due to not recognizing that marked-gfm-heading-id is being used, for example.On that note, am I missing a clear way to export the options object from Marked? If I need to just apply all the options to the Lexer and Parser separately, it would be nice to just read out the object to reuse later.
Marked.options
gives me this function instead of the options object:https://github.com/markedjs/marked/blob/ba3b7e4be7b02699b44d54a68df74c9f8ac7ad4b/src/marked.ts#L45C1-L51C3
Beta Was this translation helpful? Give feedback.
All reactions