[GH-ISSUE #455] Prefer backslash over two spaces for line breaks #2226

Open
opened 2026-03-07 20:05:44 +03:00 by kerem · 3 comments
Owner

Originally created by @thernstig on GitHub (Nov 3, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/455

Most editors and code review tools often highlight trailing white-space as a "fault". Either marking them red or similar.

Since commonmark supports both two spaces or a backslash to render a line-break, could this tool add a rule to only recommend backslash, due to the above mentioned reasons?

# Two spaces
test  
test

# Backslash
test\
test

Resource: https://commonmark.org/help/tutorial/03-paragraphs.html

Originally created by @thernstig on GitHub (Nov 3, 2021). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/455 Most editors and code review tools often highlight trailing white-space as a "fault". Either marking them red or similar. Since commonmark supports both two spaces or a backslash to render a line-break, could this tool add a rule to only recommend backslash, due to the above mentioned reasons? ```markdown # Two spaces test test # Backslash test\ test ``` Resource: https://commonmark.org/help/tutorial/03-paragraphs.html
Author
Owner

@DavidAnson commented on GitHub (Nov 3, 2021):

Yes, probably like: line-break-style and spaces/backslash/consistent

<!-- gh-comment-id:959544679 --> @DavidAnson commented on GitHub (Nov 3, 2021): Yes, probably like: line-break-style and spaces/backslash/consistent
Author
Owner

@thernstig commented on GitHub (Nov 4, 2021):

And I think backslash should be default, or consistent. Due to backslash helping with the trailing white-space issue. But I assume that would be a breaking change.

<!-- gh-comment-id:961111061 --> @thernstig commented on GitHub (Nov 4, 2021): And I think backslash should be default, or consistent. Due to backslash helping with the trailing white-space issue. But I assume that would be a breaking change.
Author
Owner

@DavidAnson commented on GitHub (Nov 4, 2021):

Right, in rules where "consistent" is an option, it is the default.

<!-- gh-comment-id:961155365 --> @DavidAnson commented on GitHub (Nov 4, 2021): Right, in rules where "consistent" is an option, it is the default.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2226
No description provided.