[GH-ISSUE #412] markdown-disable-next-line works on same line, not next line #344

Closed
opened 2026-03-03 01:25:54 +03:00 by kerem · 2 comments
Owner

Originally created by @mpoundstone on GitHub (Jul 28, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/412

I'm still getting problems returned from markdownlint for lines even when I add the <!-- markdownlint-disable-next-line --> function above a line.

For example:

- Test list item
  
<!-- markdownlint-disable-next-line -->
* Test list item with asterisk
  
- Test list item

I want to disable markdownlint for * Test list item with asterisk only but it's still returning a problem: MD004/ul-style: Unordered list style [Expected: dash; Actual: asterisk]. Even when I specify:

<!-- markdownlint-disable-next-line MD004 -->
* Test list item with asterisk

or

<!-- markdownlint-disable-next-line ul-style -->
* Test list item with asterisk

It still returns the MD004: ul-style problem. But it stops returning all problems when I put the disable function in the same line.

<!-- markdownlint-disable-next-line ul-style --> * Test list item with asterisk

And if I try to do the following,

<!-- markdownlint-disable-next-line --> * Test list item with asterisk
- Test list item

I'm returned with the following problem: MD032/blanks-around-lists: Lists should be surrounded by blank lines.

Is this a bug? Or have I made a mistake with my syntax somewhere?

Originally created by @mpoundstone on GitHub (Jul 28, 2021). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/412 I'm still getting problems returned from markdownlint for lines even when I add the `<!-- markdownlint-disable-next-line -->` function above a line. For example: ``` - Test list item <!-- markdownlint-disable-next-line --> * Test list item with asterisk - Test list item ``` I want to disable markdownlint for `* Test list item with asterisk` only but it's still returning a problem: `MD004/ul-style: Unordered list style [Expected: dash; Actual: asterisk]`. Even when I specify: ``` <!-- markdownlint-disable-next-line MD004 --> * Test list item with asterisk ``` or ``` <!-- markdownlint-disable-next-line ul-style --> * Test list item with asterisk ``` It still returns the MD004: ul-style problem. But it stops returning all problems when I put the disable function in the same line. ``` <!-- markdownlint-disable-next-line ul-style --> * Test list item with asterisk ``` And if I try to do the following, ``` <!-- markdownlint-disable-next-line --> * Test list item with asterisk - Test list item ``` I'm returned with the following problem: `MD032/blanks-around-lists: Lists should be surrounded by blank lines`. Is this a bug? Or have I made a mistake with my syntax somewhere?
kerem 2026-03-03 01:25:54 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner
<!-- gh-comment-id:888553698 --> @DavidAnson commented on GitHub (Jul 28, 2021): Your first example seems to work perfectly as-is: https://dlaa.me/markdownlint/#%25m%23%20Issue%20412%0A%0A-%20Test%20list%20item%0A%20%20%0A%3C!--%20markdownlint-disable-next-line%20--%3E%0A*%20Test%20list%20item%20with%20asterisk%0A%20%20%0A-%20Test%20list%20item%0A Where are you seeing a problem?
Author
Owner

@mpoundstone commented on GitHub (Jul 29, 2021):

Ah, looks like I can no longer recreate the issue in my VSCode environment. Possible conflict with another extension.

Apologies for the bother and thank you for responding so quickly!

<!-- gh-comment-id:889226983 --> @mpoundstone commented on GitHub (Jul 29, 2021): Ah, looks like I can no longer recreate the issue in my VSCode environment. Possible conflict with another extension. Apologies for the bother and thank you for responding so quickly!
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#344
No description provided.