[GH-ISSUE #389] [feature request] disable for next block #2173

Closed
opened 2026-03-07 20:05:15 +03:00 by kerem · 2 comments
Owner

Originally created by @CircleCode on GitHub (Apr 23, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/389

Say i want to enforce MD013 for all code blocks, except one (for example, I show raw script output, and I want it be unaltered)

I'd like to have something like

<!-- markdownlint-disable-next-block MD013 -->
```raw
some text with very long lines
[…]
```
Originally created by @CircleCode on GitHub (Apr 23, 2021). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/389 Say i want to enforce MD013 for all code blocks, except one (for example, I show raw script output, and I want it be unaltered) I'd like to have something like `````md <!-- markdownlint-disable-next-block MD013 --> ```raw some text with very long lines […] ``` `````
kerem 2026-03-07 20:05:15 +03:00
Author
Owner

@CircleCode commented on GitHub (Apr 23, 2021):

after a more attentive reading, I was able to fulfill my needs with

<!-- markdownlint-capture -->
<!-- markdownlint-disable MD013 -->
```raw
some text with very long lines
[…]
```
<!-- markdownlint-restore -->

However, i do not close this issue because I think a per block exception would make sense for readibility.
But if you consider this is too much work compared to the real benefit, feel free to close this request

<!-- gh-comment-id:825660989 --> @CircleCode commented on GitHub (Apr 23, 2021): after a more attentive reading, I was able to fulfill my needs with `````md <!-- markdownlint-capture --> <!-- markdownlint-disable MD013 --> ```raw some text with very long lines […] ``` <!-- markdownlint-restore --> ````` However, i do not close this issue because I think a *per block exception* would make sense for readibility. But if you consider this is too much work compared to the real benefit, feel free to close this request
Author
Owner

@DavidAnson commented on GitHub (Apr 23, 2021):

I agree that would be a little more elegant, but it adds complexity and assumes people know what a block is (maybe less clear with text vs. code?). I'll keep this in the back of my mind, but for now will stick with the pattern you show above. Thanks for the suggestion, glad you figure this out!

<!-- gh-comment-id:825750401 --> @DavidAnson commented on GitHub (Apr 23, 2021): I agree that would be a little more elegant, but it adds complexity and assumes people know what a block is (maybe less clear with text vs. code?). I'll keep this in the back of my mind, but for now will stick with the pattern you show above. Thanks for the suggestion, glad you figure this out!
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#2173
No description provided.