markdown-hide-markup hides the end mark of code block but leaves a blank line
Opened this issue · 0 comments
seraphlive commented
I'm not sure if this is a bug or is intended. When using markdown-hide-markup related function to hide the markup, the end mark (```) of a code block will be hide but a blank line is left. This only happens if the mark is at the end of the buffer. If there are texts following it there will be no blank line left.
Expected Behavior
There should be no extra blank line left after the markups are hided.
(only line 2 should be left.)
Actual Behavior
Line 3 is still displayed as a blank line.
No issue if there are still text followed.
Steps to Reproduce
- Create a test.md with simple code block
```lisp
(require 'package)
```
emacs -Q -load path/to/markdown-mode.el test.md
(enabledisplay-line-numbers-mode
for clarity)- execute
markdown-toggle-markup-hiding
to hide markup. - Disable the hiding and add text under the code block.
- execute
markdown-toggle-markup-hiding
again to hide markup.
Backtrace
Software Versions
- Markdown Mode: 20230227.342
- Emacs: GNU Emacs 29.0.60 Development version 9e105d483fa5 on emacs-29 branch; build date 2023-03-03
- OS: Ubuntu 22.04 through WSL2