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
馃憢Hello. I am using marked and it is a great library, thank you for creating it.
According to this discussion, V4.2.3 is supposed to be 100% compliant with the "Lists" and "List items" of the CommonMark standard. However, it seems to have some issues with parsing lists that contain line breaks, such as the following:
A list may start or end with an empty list item. So 1. is a list item with empty content.
In this case, the width W of the list marker (1.) is 2, so in order for Monday to become the content of 1., it needs to have 3 (= W + 1) or more spaces of indentation. In the given example, since there are 0 spaces, Monday should become regular text (<p>).
Example1:
1.
Monday
Expected result:
<ol>
<li></li>
</ol>
<p>Monday</p>
Example2:
1.
Monday
Expected result:
<ol>
<li>Monday</li>
</ol>
The text was updated successfully, but these errors were encountered:
Marked version:
4.3.0
4.2.3
Describe the bug
馃憢Hello. I am using marked and it is a great library, thank you for creating it.
According to this discussion, V4.2.3 is supposed to be 100% compliant with the "Lists" and "List items" of the CommonMark standard. However, it seems to have some issues with parsing lists that contain line breaks, such as the following:
To Reproduce
Steps to reproduce the behavior:
(3 list items)
(an empty list item and a
<p>
)Expected behavior
I believe that parsing it in the following way, like in CommonMark, is correct:
Explanation
According to CommonMark 5.2 List items:
1.
is a list item with empty content.W
of the list marker (1.
) is2
, so in order forMonday
to become the content of1.
, it needs to have3
(=W + 1
) or more spaces of indentation. In the given example, since there are0
spaces,Monday
should become regular text (<p>
).Example1:
Expected result:
Example2:
Expected result:
The text was updated successfully, but these errors were encountered: