[GH-ISSUE #34] ordered and unordered lists recognized where there are none #25

Closed
opened 2026-03-03 01:23:07 +03:00 by kerem · 1 comment
Owner

Originally created by @g3o2 on GitHub (Nov 23, 2016).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/34

The following text triggers linting rules MD 29 and 30/32.

This example text triggers linting rules number 29 and
32. If no sentence follows the previous one, linting rules 29 and 30 are triggered.

A possible solution would be to search first for dot (.) in the line preceding the supposed ordered list. Only when . is found should rules 29, 30/32 be triggered.

Case of falsely recognised unordered list:

This example text triggers linting rule number 32
- and sometimes rule number 4.
Originally created by @g3o2 on GitHub (Nov 23, 2016). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/34 The following text triggers linting rules MD 29 and 30/32. ```markdown This example text triggers linting rules number 29 and 32. If no sentence follows the previous one, linting rules 29 and 30 are triggered. ``` A possible solution would be to search first for dot (`.`) in the line preceding the supposed ordered list. Only when `.` is found should rules 29, 30/32 be triggered. Case of falsely recognised unordered list: ```markdown This example text triggers linting rule number 32 - and sometimes rule number 4. ```
kerem 2026-03-03 01:23:07 +03:00
Author
Owner

@DavidAnson commented on GitHub (Jan 15, 2017):

After reading the spec, I learned that un/ordered lists do interrupt a paragraph - with the exception of numbers other than "1.". The specification explains this well: http://spec.commonmark.org/0.27/#lists

Based on that, you can verify that the second of the examples above is (correctly) parsed as an unordered list: https://markdown-it.github.io/

I'll have a fix for the first of the examples above tomorrow. Thanks for reporting this!

<!-- gh-comment-id:272673505 --> @DavidAnson commented on GitHub (Jan 15, 2017): After reading the spec, I learned that un/ordered lists *do* interrupt a paragraph - with the exception of numbers other than "1.". The specification explains this well: http://spec.commonmark.org/0.27/#lists Based on that, you can verify that the second of the examples above is (correctly) parsed as an unordered list: https://markdown-it.github.io/ I'll have a fix for the first of the examples above tomorrow. Thanks for reporting this!
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#25
No description provided.