jrblevin / markdown-mode

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

"_" character in a variable name turns on underline #823

Closed worikgh closed 4 months ago

worikgh commented 4 months ago

If I have a sentence like: "The foo_bar frobnicates anthen" underlining is turned on between the two "" characters

Underlining should not be turned on in that case.

Checking https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet underlining is when " \w" and "\w " are used around a section of text. The spaces matter.

In my example there are no spaces, so there should be no underlining

Actual Behavior

Steps to Reproduce

  1. Step A
  2. Step B
  3. Step C

Backtrace

Software Versions

Emacs 30.0.50 Markdown mode: 20231028.853 OS: Debian 12

syohex commented 4 months ago

markdown-mode implements the original markdown specification and it does not mention about this use case unlike GFM, CommonMark. gfm-mode supports this use case so please check gfm-mode(M-x gfm-mode).

(add-to-list 'auto-mode-alist '("\\.md\\'" . gfm-mode))