You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<olstart="9"><li><p><strong>I came in like a wrecking ball</strong></p><p><imgsrc="https://upload.wikimedia.org/wikipedia/commons/b/bd/Test.svg" alt=""></p></li><li><p><strong>I never hit so hard in love</strong></p><p><imgsrc="https://upload.wikimedia.org/wikipedia/commons/b/bd/Test.svg" alt=""></p></li></ol>
Should be converted to:
9.**I came in like a wrecking ball**![](https://upload.wikimedia.org/wikipedia/commons/b/bd/Test.svg)10.**I never hit so hard in love**![](https://upload.wikimedia.org/wikipedia/commons/b/bd/Test.svg)
But instead it's converted to this non-commonmark compliant code:
9. **I came in like a wrecking ball**
![](https://upload.wikimedia.org/wikipedia/commons/b/bd/Test.svg)
10. **I never hit so hard in love**
![](https://upload.wikimedia.org/wikipedia/commons/b/bd/Test.svg)
Which creates a code_block instead of regular text and images because of the following CommonMark spec:
Remove whatever is adding the unwanted indentation between the list number and the list title. If this is intentional indentation, then move it to the beginning of the line, not between the list item.
That currently breaks 14 tests:
not ok 103 should be equal
not ok 104 should be equal
not ok 105 should be equal
not ok 106 should be equal
not ok 107 should be equal
not ok 108 should be equal
not ok 115 should be equal
not ok 116 should be equal
not ok 119 should be equal
not ok 120 should be equal
not ok 127 should be equal
not ok 128 should be equal
not ok 139 should be equal
not ok 140 should be equal
Additional notes:
The strong emphasis ** is not needed to reproduce the problem.
A space before the 9 looks nice, but isn't absolutely necessary in my testing
The text was updated successfully, but these errors were encountered:
FossPrime
changed the title
Turndown indents list items that were not previously indented
Turndown lists over 9 items long break with indented content
May 11, 2022
FossPrime
changed the title
Turndown lists over 9 items long break with indented content
Lists over 9 items long break with indented content
May 11, 2022
FossPrime
added a commit
to FossPrime/turndown
that referenced
this issue
May 11, 2022
The following html
Should be converted to:
But instead it's converted to this non-commonmark compliant code:
Which creates a code_block instead of regular text and images because of the following CommonMark spec:
Proposed solution
Remove whatever is adding the unwanted indentation between the list number and the list title. If this is intentional indentation, then move it to the beginning of the line, not between the list item.
That currently breaks 14 tests:
Additional notes:
**
is not needed to reproduce the problem.turndown/src/commonmark-rules.js
Line 74 in ef41a54
The text was updated successfully, but these errors were encountered: