markdownlint
markdownlint copied to clipboard
`markdownlint-disable-next-line` should apply to the next non-empty line
Ideally this should work.
<!-- markdownlint-disable-next-line MD013 -->
Some really looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong line
Additional Context
Prettier will always insert an empty line after comments in markdown.
If you ask me, Prettier shouldn't break stuff like this just for fun. The meaning of "next line" is pretty clear in my mind and if we start trying to redefine it to mean "next line with content but hey is white space content well I don't know just take a guess", I think that could get confusing. :)
The example you show is possible today with the following pattern shown in the README:
<!-- markdownlint-capture -->
<!-- markdownlint-disable MD013 -->
looong line
<!-- markdownlint-restore -->
I am not inclined to add more complexity for this scenario as it seems pretty niche.
Problem is that if a rule forces newlines (e.g. around headings), then you can't ignore a rule for that heading. Trying to use markdownlint-disable-line on the same line of the heading makes the fragment rule fail when trying to link to that heading (I guess a separate issue?)