You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I'm a huge fan of this mode, one thing has bugged me for years: whenever you create two adjoining (HTML) comments — without any whitespace between them — the second renders in the default face, instead of the comment face. This is annoying to me, since my documents are filled with comments, meaning that I have to jump to all sorts of hoops to make two adjoining comments discernible from the main text (I write academic documents in markdown on a daily basis, and I use comments for all sorts of purposes).
It's of course possible to solve this issue by inserting whitespace in between the two comments. However, this distracts me from my writing flow, and, more importantly, creates unwanted whitespace in the resulting document (e.g. a pdf I create from the .md file; see screenshot in §Actual Behavior).
Note that this does not happen in emacs' HTML-mode (i.e. both adjoining comments render in the correct face). As such, this issue should in principle be solvable.
Expected Behavior
Whenever two comments are placed side-by-side (without whitespace between them), both should render in the markdown-comment-face.
Actual Behavior
The second comment is rendered in the default face. Here is a screenshot that shows the problem:
Steps to Reproduce
Create a .md file with the following contents:
Main text <!--a comment--><!--another comment-->.
(ironically, github does render this example correctly when using markdown syntax highlighting!)
Backtrace
Not applicable I think; this is reproducible using emacs -Q.
Software Versions
Markdown Mode: 20210107.101 (though this issue has been present in versions from years ago)
Emacs: 25–28 (I think I started emacs around version 25, and this bug has always been present)
OS: tested on Linux (kernels 4.x–5.x), macOS
The text was updated successfully, but these errors were encountered:
While I'm a huge fan of this mode, one thing has bugged me for years: whenever you create two adjoining (HTML) comments — without any whitespace between them — the second renders in the default face, instead of the comment face. This is annoying to me, since my documents are filled with comments, meaning that I have to jump to all sorts of hoops to make two adjoining comments discernible from the main text (I write academic documents in markdown on a daily basis, and I use comments for all sorts of purposes).
It's of course possible to solve this issue by inserting whitespace in between the two comments. However, this distracts me from my writing flow, and, more importantly, creates unwanted whitespace in the resulting document (e.g. a pdf I create from the .md file; see screenshot in §Actual Behavior).
Note that this does not happen in emacs'
HTML-mode
(i.e. both adjoining comments render in the correct face). As such, this issue should in principle be solvable.Expected Behavior
Whenever two comments are placed side-by-side (without whitespace between them), both should render in the
markdown-comment-face
.Actual Behavior
The second comment is rendered in the default face. Here is a screenshot that shows the problem:
Steps to Reproduce
Main text <!--a comment--><!--another comment-->.
(ironically, github does render this example correctly when using markdown syntax highlighting!)
Backtrace
Not applicable I think; this is reproducible using
emacs -Q
.Software Versions
The text was updated successfully, but these errors were encountered: