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

New rule: Prevent lazy continuation lines #977

Open
skwde opened this issue Sep 15, 2023 · 3 comments
Open

New rule: Prevent lazy continuation lines #977

skwde opened this issue Sep 15, 2023 · 3 comments
Labels

Comments

@skwde
Copy link

skwde commented Sep 15, 2023

This is somewhat related to MD032 and emerged from #972

Lazy line conditions make the markdown file less readable. That is because

1. abc
2. def
ghi

behave the same like standard lists

1. abc
2. def
   ghi

Even more confusing/weird is the behavior when using multiple levels like

- abc
  + def
ghi

where ghi goes to the 2nd indent level.

In addition, as mentioned in https://github.com/DavidAnson/markdownlint/blob/main/doc/md032.md some parsers do not parse lists if they are not surrounded by blank lines. MD032 is however only concerned with the starting line because it cannot know when it should be a lazy line continuation or when the list is done.

@BlaineEXE
Copy link

Ditto. This would be a great add :)

@amyq
Copy link

amyq commented Jun 3, 2024

Chiming in here. My coworker Marcel (@Ravlen) and I have been talking about this problem over in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/155088 for the GitLab docs. He's trying to construct a rule in Vale to error out on (what I now know are) lazy continuation lines.

While lazy continuation lines are valid CommonMark, I agree with Marcel - when managing Markdown-formatted docs at scale, our technical writing team would find it helpful to prevent them from creeping into our docs. It feels like a good rule to leave off by default, but make available to users who need every scrap of scannability improvements they can get.

@Ravlen
Copy link

Ravlen commented Jun 4, 2024

Yeah, 👍 from me, though I think this is a repeat of the request in #344, where I've got a non-breaking change suggestion that could work in #344 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants