mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #502] New rule: No line wrapping #409
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#409
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @groenroos on GitHub (Feb 22, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/502
As a sort of antithesis to MD013, I'd want a new (off by default) rule that enforces all paragraphs to be on a single line, with a blank line in between.
Under this proposed rule, this would fail:
But this would pass:
For what it's worth, I definitely understand the rationale for MD013, and I don't think it should be turned off by default.
But in many modern contexts, code editors and diff viewers have built-in line wrapping, which adjust based on the width of the editor, rather than baked in at <80 characters.
And as far as I can tell, there's also no enforcement that the author does indeed utilise all 80 characters fully, so the linter can let through some annoyingly formatted text;
On the other hand, if you want to utilise the 80 characters to its fullest, but then had to add a sentence in the middle of a long paragraph, you'd need to spend time manually re-flowing the subsequent text, and cause a less clear git diff in the process.
Additionally, for the work I do, a single line break between text is more often an unintended side effect of pasting content from a WYSIWYG text editor, rather than a deliberate effort by the author.
This is then exacerbated by the fact that some Markdown parsers (like GitHub) treat a newline in the middle of a paragraph as a
<br/>, and so this baked-in line wrapping then bleeds into presentation as well. It can become ambiguous where the author did intend a forced line break, and where they were wrapping lines.For these reasons, I'd like to have the option for a rule that enforces no line wrapping by the author. Turning this rule on would automatically turn MD013 off.
@nschonni commented on GitHub (Feb 22, 2022):
Duplicate of https://github.com/DavidAnson/markdownlint/issues/298
@DavidAnson commented on GitHub (Feb 22, 2022):
Agreed. Closing this as Nick has established a link here from there. Thanks for the thorough issue!