Faulty recognition of closing sequence in atx headers
kuranari opened this issue · 0 comments
kuranari commented
Expected Behavior
- We want trailing spaces to be visible when
markdown-hide-markup
is enabled.- The current behavior results in an unnatural input experience(see the attached video for more details).
- The closing sequence must be preceded by a space or tab
- According to the Common Mark specification: https://spec.commonmark.org/0.30/#example-75
Actual Behavior
- Trailing spaces are not visible when 'markdown-hide-markup' is enabled.
- A closing sequence is identified even without a trailing whitespace.
Steps to Reproduce
Input # foo#
or ## Steps to Reproduce
default.mov
The whitespace appears when the next character is entered.
Software Versions
- Markdown Mode: 2.6-alpha
- Emacs: GNU Emacs 28.2
- OS: macOS Ventura 13.3.1 (a)
Additional Details
The issue occurs due to the definition of markdown-regex-header
.
Changes were introduced to align with the implementation of Markdown.pl as per this commit: 26e3937
While the behavior of the whitespace following the opening sequence was modified with this commit: 58ba6a3, the behavior of the whitespace preceding the closing sequence was not altered.