markdown-it-rust / markdown-it

markdown-it js library rewritten in rust
Other
79 stars 9 forks source link

Add Link definition node to the AST #22

Closed chrisjsewell closed 1 year ago

chrisjsewell commented 1 year ago

For HTML rendering, this is not necessary, since it is not rendered. But for use cases, such a "round-trip" rendering (MD -> MD), or syntax analysis tools, it would be necessary to have this present in the AST.

(similarly capturing the original labels of link references would also be required but, if accepted, I can add that in a separate PR)

rlidwka commented 1 year ago

Looks good to me.

Not sure about name, what are the chances that Definition is gonna collide with something like footnote definitions?