Syntax Highlighting in Footnotes
RobertGoulding opened this issue · 7 comments
Yes, the regexes seem to be wrong... Not just because they're too greedy, BTW. I'll have to look into this more closely.
Thanks for pointing this out.
The commit I just pushed is the best fix I can provide right now. It basically reduces fontification of citations to just the key. Fontifying the entire citation turned out to be problematic in the case of multiple citations (separated with ;
). Details are in the commit message.
I may revisit the issue some time in the future, but for now I think it's best to just fontify the citation key, so that citations don't fontify the entire footnote.
Also, this now messes up some references with hyphens in them. So, my pandoc-crossref references such as @.***:kepler-simplified] are only highlighted up to (but not including) the hyphen.
That was due to an error in my regex. Should be fixed now.
This is still not quite working. Footnotes that have no citations in them are highlighted following markdown-mode. But footnotes WITH citations are not highlighted at all -- except for the citations. Robert Goulding Sent from my Google Pixel 4
Thanks for pointing that out. I tweaked the code a bit and now it appears to be working.