-
Notifications
You must be signed in to change notification settings - Fork 173
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
Autolink and footnote extensions incorrectly process footnotes with certain letters #121
Comments
Nice. It seems to be an interaction between Output from
Both the |
A quick look at the code shows that this test is failing for the footnote refs that are not being recognised - that is, |
@tonyg Thanks for pointing me in the right direction. For one of the cases cmark-gfm/extensions/autolink.c Lines 419 to 422 in 36e36cd
I don't know why these would be added. Removing them fixed the But it doesn't fix the case of |
We add the special chars so the autolink extension gets called when it sees a |
Thanks for the update @kivikakk. Hmmm.... |
incidentally, this doesn't happen with capital W, only with lowercase. |
While standardizing on I chose to focus on just understanding how the footnote references work (thanks for the pointer @tonyg!), and after doing some thinking I think I came to a reasonable solution which can be found here: #227 tldr, i think it's safe to ignore that nodes that the autolinker is adding to the parser's ast (which is why the Reviews / feedback welcome! |
Awesome, thanks @phillmv ! |
Ran across a strange interaction. With footnotes and autolink enabled, certain footnote names, like with a
w
or an underscore in it, will cause the footnote not to be processed. Here's an example:using
cmark-gfm --extension footnotes --extension autolink
givesUsing version
cmark-gfm 0.28.3.gfm.16
The text was updated successfully, but these errors were encountered: