-
Notifications
You must be signed in to change notification settings - Fork 5
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
Definition nodes #2
Comments
Does definition nodes include things like Right now my usage for front-matter is: run What would be nice to have is instead:
and if the partial AST from the first partial parse step is returned, whether have quick node look up is not a feature that I must have. This feature is something you can always add slowly later. I think
markdown-it is fast, and fast enough. To do incremental parse you can always add a depth-limiter I think Another interesting thing about LaTeX is that LaTeX by definition is a macro-language. Which means that definitions do not have to be unique (@dpvc might have more insight, from math-jax's equation reference it looks like some of the global references do need to be unique). The way Again, I would support a pure AST tree, no fast look up, with an optional global env object that you return that the user can use to access globals. |
I mean http://spec.commonmark.org/0.27/#link-reference-definitions Frontmatter-like things are just headers. Those can be processed via regexp without running markdown at all. |
Right, but from the user's perspective (my humble perspective really XD) Those are things I see through markdown parser. Compared with having regex parsing those, it is a lot better for me to use markdwon-it plus front-matter plugin to get it more professionally. This is why it is also nice to have a depth limiter to make this initial parse fast, because I can assume that markdown-it does it correctly. Like the saying you shouldn't parse HTML using regex, same applies here. |
In my eyes this looks as attempt to use low-level instrument for high-level task. If users need to extract metadata, they should do wrapper, which:
I don't see any problems with depth limiter here. Also, depth limits depends on algorythms. If you inspect reference implementations, you will see it has no problems with depth at all (but it's not pluggable). |
Anyway, let's keep this issue for main topic - how to store links definitions in document. |
Problem:
How to store?
Checklist
The text was updated successfully, but these errors were encountered: