yshavit / mdq

like jq but for Markdown: find specific elements in a md doc
Apache License 2.0
5 stars 0 forks source link

self-referencing footnotes spin mdq into an infinite loop #188

Open yshavit opened 3 weeks ago

yshavit commented 3 weeks ago
Body with some footnote[^1].

[^1]: footnote text references itself[^1].

Body with some footnote[^1].

[^1]: footnote text references itself[^1].


We spin into an infinite loop on this even in tree.rs, before even getting to selectors or output.

yshavit commented 3 weeks ago

Note that this can also happen with a mult-node hop; footnote [^1] references [^2] which references [^1].