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

highlight hard line breaks in markdown #900

Closed
999px opened this issue Oct 30, 2024 · 8 comments
Closed

highlight hard line breaks in markdown #900

999px opened this issue Oct 30, 2024 · 8 comments

Comments

@999px
Copy link

999px commented Oct 30, 2024

Is there any way to highlight "double spaces" at the end of lines in markdown?
This would be very useful.

@zufuliu
Copy link
Owner

zufuliu commented Oct 31, 2024

What is "double spaces"? you can use menu "Edit -> Selection -> Strip Trailing Blanks" to removed unwanted spaces at line end.

@999px
Copy link
Author

999px commented Oct 31, 2024

What is "double spaces"? you can use menu "Edit -> Selection -> Strip Trailing Blanks" to removed unwanted spaces at line end.

at the end of the line "two spaces" or "\" is a line break in markdown.
I don't want to delete them, I want them to be visible.
just - Enter, we don't make a line break in markdown, we also need to add "two spaces" at the end of the line.
It would be just great if it were possible to highlight two spaces at the end of the line (and the "\" sign at the end of the line) in markdown.

These "two spaces" at the end of a line are in the standard markdown syntax.
for example, here it is written about it:
https://www.markdownguide.org/basic-syntax/#line-break-best-practices

@zufuliu zufuliu changed the title highlight "double spaces" at the end of lines in markdown highlight hard line breaks in markdown Nov 1, 2024
@zufuliu
Copy link
Owner

zufuliu commented Nov 1, 2024

Thanks for the explanation, here is the syntax https://github.github.com/gfm/#hard-line-breaks

@999px
Copy link
Author

999px commented Nov 1, 2024

Planning to add highlighting for "two spaces", "" in the new version for markdown?

@zufuliu
Copy link
Owner

zufuliu commented Nov 1, 2024

No, it's a bit hard to implement due to the restriction:

Hard line breaks are for separating inline content within a block. Neither syntax for hard line breaks works at the end of a paragraph or other block element:

@999px
Copy link
Author

999px commented Nov 1, 2024

Could it be made a bit simpler, at least?
There’s already a setting in the View menu for displaying spaces.

Could add one more option there?
Show spaces (except single spaces)

@zufuliu zufuliu added this to the v24.11 milestone Nov 2, 2024
@zufuliu
Copy link
Owner

zufuliu commented Nov 2, 2024

Implemented by e3124e2 with minor false positive for \ or double-spaces at the end of a paragraph.
image

@999px
Copy link
Author

999px commented Nov 2, 2024

Thank you very much!!! :)
Now working with Markdown has become much easier and more enjoyable

@zufuliu zufuliu closed this as completed Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants