jrblevin / markdown-mode

Emacs Markdown Mode
http://jblevins.org/projects/markdown-mode/
GNU General Public License v3.0
893 stars 162 forks source link

footnote text uses url face #551

Open lennart opened 3 years ago

lennart commented 3 years ago

Expected Behavior

footnote text face should match normal text face or footnote marker face.

Actual Behavior

footnote text face is actually url face which is quite misleading, as the text is not a url. is there a reason for this?

Steps to Reproduce

body copy[^1]

a [real link](http://example.com/a-true-url)

[^1]: footnote text

in this case, markdown mode will highlight both http://example.com/a-true-url and footnote text with the exact same face. I would expect the footnote text to be different, or at least to allow customization of it.

Backtrace

-

Software Versions


thanks for this mode, I really appreciate it, especially the markup-hiding features!

syohex commented 3 years ago

markdown-mode does not support footnote except pandoc extension yet. And commonmark and GFM does not support footnote yet. However footnote syntax are matched as reference link(See original markdown specification https://daringfireball.net/projects/markdown/syntax) which accepts link/URL, so markdown-mode highlight it with markdown-url-face

If commonmark or GFM supports footnote, I'll define faces as you suggest.

Knusper commented 1 month ago

GFM supports footnotes since a while now: https://github.blog/changelog/2021-09-30-footnotes-now-supported-in-markdown-fields/

Commonmark based parsers often support it via extensions. Some more love for footnotes would be appreciated, as they are commonly used in academic writing.