Repository navigation
fix: indent a list nested in a numbered item to the item text in Mark… - #984
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #984 +/- ##
=======================================
Coverage 99.95% 99.95%
=======================================
Files 21 21
Lines 4174 4177 +3
=======================================
+ Hits 4172 4175 +3
Misses 2 2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nested list items were always indented by 2 spaces per level. That works under a - bullet, but CommonMark needs a nested list to start where the text of its parent item starts: 3 spaces after 1. and 4 after 10. . With 2,
- one
- inner
- two
came out as 1. one\n 1. inner\n2. two, which Markdown renderers show as three sibling items instead of a nested list (checked with markdown-it-py)._list_marker() now indents a nested item by the width of its parent item's marker, so the output nests as in the HTML. Lists under bullets (- a\n 1. b, test A5-nested-ordered) and plain-text output are unchanged. Added tests for an ordered list in an ordered item, bullets in an ordered item, and a list under a two-digit item.