markdown-mode
markdown-mode copied to clipboard
Inline styles fail to syntax-highlight when broken by newlines
For example, the following won't syntax-highlight the *X X*'s properly until the user puts a character after the second X:
|
|
|
This is worrying because it could imply that the rules for syntax highlighting are broken somehow. This also appears to affect inline code. For example, the following shows how the highlighter could be made to highlight incorrectly by accident:
|
|
|
Trying this situation on italics leads however leads to very different parsing failure:
|
|
|
This inconsistency appears more often than you'd expect, since markdown-fill-paragraph is programmed to split inline elements when it needs to. This leads to exactly situations like this.
Expected Behavior
The *X X* should be underlined by the fontification / syntax highlighting.
Actual Behavior
The *X X* is not underlined by the fontification / syntax highlighting.
Steps to Reproduce
- Paste the following markdown into an emacs buffer:
Test *X X* - See error 1
- Paste the following markdown into the emacs buffer:
Test `X X` more text `another inline code` - See errror 2
- Paste the following markdown into the emacs buffer:
Test *X X* more text *another inline code* - See error 3