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
(I'm opening a blank issue because the package:markdown issue type isn't available on the New Issue page.)
Problem
If UnorderedListWithCheckboxSyntax precedes SetextHeaderSyntax in BlockParser's blockSyntaxes (as is the case when ExtensionSet.gitHubFlavored is enabled, due to its inclusion of UnorderedListWithCheckboxSyntax), the following text will be rendered as an empty list item:
I am paragraph
-
Actual Output
I am paragraph is ignored, producing an empty list item, as follows:
Expected Output
I am paragraph should be rendered as a SETEXT-style heading. Check:
import'package:markdown/markdown.dart'as md;
voidmain() {
final md.Document document = md.Document(
blockSyntaxes: [
const md.UnorderedListSyntax(), // <-- This line breaks the case
],
);
finalList<md.Node> astNodes = document.parse("I am paragraph\n-");
print((astNodes[0] as md.Element).tag); // should print: h2; actual print: ul
}
The text was updated successfully, but these errors were encountered:
w568w
changed the title
[markdown] Putting UnorderedListWithCheckboxSyntax before SetextHeaderSyntax leads to incorrect parsing
[markdown] Putting UnorderedListWithCheckboxSyntax before SetextHeaderSyntax leads to incorrect parsing of "a\n-"Dec 31, 2024
(I'm opening a blank issue because the
package:markdown
issue type isn't available on the New Issue page.)Problem
If
UnorderedListWithCheckboxSyntax
precedesSetextHeaderSyntax
inBlockParser
'sblockSyntaxes
(as is the case whenExtensionSet.gitHubFlavored
is enabled, due to its inclusion ofUnorderedListWithCheckboxSyntax
), the following text will be rendered as an empty list item:I am paragraph -
Actual Output
I am paragraph
is ignored, producing an empty list item, as follows:Expected Output
I am paragraph
should be rendered as a SETEXT-style heading. Check:https://spec.commonmark.org/dingus/?text=I%20am%20paragraph%0A-
Minimal Reproducible Example
The text was updated successfully, but these errors were encountered: