jupyter-book / mystmd

Command line tools for working with MyST Markdown.
https://mystmd.org/guide
MIT License
219 stars 64 forks source link

Links that start with @ are treated as citations even if they're not #1618

Open choldgraf opened 3 weeks ago

choldgraf commented 3 weeks ago

It seems that the citation auto-detection is a bit overzealous sometimes. I noticed that adding a link to somebody's handle, like this:

[@rowanc1](https://github.com/rowanc1)

Will result in build warnings like this:

⚠️  index.md:13:2 Could not link citation with label "rowanc1".
agoose77 commented 2 weeks ago

I think this should be handled by escaping explicitly, i.e. \@rowanc1, as we're treating @ as a special character now. We could definitely extend the escaping logic, but I think treating it as special is probably the easiest to reason about.