[GH-ISSUE #152] Fenced code blocks not recognized when nested under list item #130

Closed
opened 2026-03-03 01:23:59 +03:00 by kerem · 2 comments
Owner

Originally created by @dbader on GitHub (Oct 31, 2018).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/152

Thanks for this awesome project, it's been incredibly helpful in standardizing the format of our written content 😄

I'm having an issue with fenced code blocks that are nested under list items not being recognized as code blocks. For example, the following file will trigger the no-multiple-blanks while inside the second code block.

test.md:

# Test

```text
line1


line2
```

- List item 1

    ```text
    line1


    line2
    ```
$ markdownlint test.md
test.md: 15: MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]

Running markdownlint@0.11.0 via markdownlint-cli@0.13.0

Originally created by @dbader on GitHub (Oct 31, 2018). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/152 Thanks for this awesome project, it's been incredibly helpful in standardizing the format of our written content 😄 I'm having an issue with fenced code blocks that are nested under list items not being recognized as code blocks. For example, the following file will trigger the `no-multiple-blanks` while inside the second code block. `test.md`: # Test ```text line1 line2 ``` - List item 1 ```text line1 line2 ``` ```sh $ markdownlint test.md test.md: 15: MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] ``` Running `markdownlint@0.11.0` via `markdownlint-cli@0.13.0`
kerem 2026-03-03 01:23:59 +03:00
Author
Owner

@DavidAnson commented on GitHub (Oct 31, 2018):

Sorry about that, I think this is a duplicate of what’s underlying #151. I will look into this once I finish a couple of other in-progress projects. Thanks!

<!-- gh-comment-id:434554264 --> @DavidAnson commented on GitHub (Oct 31, 2018): Sorry about that, I think this is a duplicate of what’s underlying #151. I will look into this once I finish a couple of other in-progress projects. Thanks!
Author
Owner

@dbader commented on GitHub (Oct 31, 2018):

No worries at all David and THANKS SO MUCH for this awesome project, it's been incredibly helpful :)

<!-- gh-comment-id:434557767 --> @dbader commented on GitHub (Oct 31, 2018): No worries at all David and THANKS SO MUCH for this awesome project, it's been incredibly helpful :)
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#130
No description provided.