Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markdown-hide-markup hides the end mark of code block but leaves a blank line #754

Open
seraphlive opened this issue Mar 6, 2023 · 0 comments

Comments

@seraphlive
Copy link

seraphlive commented Mar 6, 2023

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.
image
(only line 2 should be left.)

Actual Behavior

Line 3 is still displayed as a blank line.
image

No issue if there are still text followed.
image

Steps to Reproduce

  1. Create a test.md with simple code block
```lisp
(require 'package)
```
  1. emacs -Q -load path/to/markdown-mode.el test.md (enable display-line-numbers-mode for clarity)
  2. execute markdown-toggle-markup-hiding to hide markup.
  3. Disable the hiding and add text under the code block.
  4. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant