[GH-ISSUE #126] Modify MD029 to allow 0 as an option #1954

Closed
opened 2026-03-07 20:03:07 +03:00 by kerem · 3 comments
Owner

Originally created by @marvhen on GitHub (Jun 7, 2018).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/126

Hi thanks for markdownlint...I really like it!

What do you think about modifying the MD029/ol-prefix: Ordered list item prefix rule (and/or MD005/list-indent) to allow numeric list markers to align vertically on their decimal position? This, in my opinion, improves readability when viewing the markdown as plain text.

Attached are some examples. I tried creating a custom rule by starting out with the built-in rule but I get I'm not sure how to include shared.js.

capture

Originally created by @marvhen on GitHub (Jun 7, 2018). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/126 Hi thanks for markdownlint...I really like it! What do you think about modifying the **MD029/ol-prefix: Ordered list item prefix** rule (and/or **MD005/list-indent**) to allow numeric list markers to align vertically on their decimal position? This, in my opinion, improves readability when viewing the markdown as plain text. Attached are some examples. I tried creating a custom rule by starting out with the built-in rule but I get I'm not sure how to include shared.js. ![capture](https://user-images.githubusercontent.com/12300004/41109316-be3984cc-6a44-11e8-996d-8a700208c050.GIF)
kerem 2026-03-07 20:03:07 +03:00
Author
Owner

@DavidAnson commented on GitHub (Jun 7, 2018):

This seems reasonable and is allowed by the CommonMark specification. I'll give this a try in the next round of updates, thanks!

Regarding custom rules, shared.js is not required. You can see simple examples here: https://github.com/DavidAnson/markdownlint/blob/master/doc/CustomRules.md

<!-- gh-comment-id:395481236 --> @DavidAnson commented on GitHub (Jun 7, 2018): This seems reasonable and is allowed by the CommonMark specification. I'll give this a try in the next round of updates, thanks! Regarding custom rules, `shared.js` is not required. You can see simple examples here: https://github.com/DavidAnson/markdownlint/blob/master/doc/CustomRules.md
Author
Owner

@marvhen commented on GitHub (Jun 7, 2018):

Thanks! awesome.

I'll look at the examples a little closer...for some reason I was thinking I needed to be able to call flattenLists().

<!-- gh-comment-id:395489551 --> @marvhen commented on GitHub (Jun 7, 2018): Thanks! awesome. I'll look at the examples a little closer...for some reason I was thinking I needed to be able to call `flattenLists()`.
Author
Owner

@DavidAnson commented on GitHub (Jun 7, 2018):

flattenLists is convenient, but not necessary. Or you could duplicate it. Some of the helper methods were weird enough that I did not want to make them a supported public API.

<!-- gh-comment-id:395543653 --> @DavidAnson commented on GitHub (Jun 7, 2018): `flattenLists` is convenient, but not necessary. Or you could duplicate it. Some of the helper methods were weird enough that I did not want to make them a supported public API.
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#1954
No description provided.