You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Question] Can marked return JSON instead of HTML? #1626
Yes, I am working on that but it might take a while to figure out how to do it without breaking dependents that work around the current way of doing things.
Activity
UziTech commentedon Mar 24, 2020
You can get the block tokens in json by using
marked.lexer(md, options). You can see the lexer output in the demo.This only shows the block tokens. It does not show the inline tokens inside paragraph tokens.
zaydek commentedon Mar 24, 2020
Thanks! Are there plans to export inline elements to the lexer output as well?
UziTech commentedon Mar 24, 2020
Yes, I am working on that but it might take a while to figure out how to do it without breaking dependents that work around the current way of doing things.
zaydek commentedon Mar 24, 2020
Ah, thanks! Will close this.