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

Comments do not fill properly #833

Open
joeljamesadamson opened this issue Jun 20, 2024 · 1 comment
Open

Comments do not fill properly #833

joeljamesadamson opened this issue Jun 20, 2024 · 1 comment

Comments

@joeljamesadamson
Copy link

joeljamesadamson commented Jun 20, 2024

Expected Behavior

When using M-q fill-paragraph in a block of comments, comment markers should reframe so the beginnings and endings of lines are marked with comments. For example:


<!--- this is a comment that goes over the end of the line I have set with fill-column -->
<!--- and this is the continuation of that line after using M-q -->

This is the default behavior in every other major mode that uses comments; some do not have an end-of-line delimiter, of course.

Actual Behavior

What happens instead is that if a comment goes past fill-column and then the user presses M-q, the beginning and ending of lines are inserted into the center of the line, i.e. the text is all filled as if it were regular text and there were no comment delimiters:

<!--- this is a comment that goes over the end of the 
line I have set with fill-column --> <!--- and this is the 
continuation of that line after using M-q -->

All of it is still font-locked as a comment, and will still be processed as a comment, but it doesn't look good and it doesn't fit with typical Emacs behavior.

Steps to Reproduce

  1. Insert comment delimiters using M-;
  2. Start typing! and type well past fill-column
  3. Put the point anywhere in that comment block and use either fill-paragraph or M-q

Backtrace

Software Versions

markdown-mode, version 2.6
GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0)
on Arch Linux

  • Markdown Mode:
  • Emacs:
  • OS:
@joeljamesadamson
Copy link
Author

joeljamesadamson commented Jun 20, 2024

An alternative would be to have the whole block reframe so that there's a <!--- at the beginning and a --> at the end with no delimiters marking the intervening lines. But that doesn't happen either.

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