Tempest version
3.0
PHP version
8.5
Operating system
Linux
Description
ListRule and OrderedListRule exist in src/LexerRules/ but aren't in Lexer::__construct's default rule array, so the default Markdown/Parser renders list syntax as literal paragraph text.
Repro:
$md = new Tempest\Markdown\Markdown(highlighter: null);
$md->parse("- item")->html;
// got: "<p>- item</p>"
// expected: "<ul><li>item</li></ul>"
$md->parse("1. item")->html;
// got: "<p>1. item</p>"
// expected: "<ol><li>item</li></ol>"
Side note: ListRule::shouldLex and OrderedListRule::shouldLex trigger on bare - / digit rather than - / digit. + separator, so -2 would render as a list item. Worth fixing as well.
Tempest version
3.0
PHP version
8.5
Operating system
Linux
Description
ListRule and OrderedListRule exist in src/LexerRules/ but aren't in Lexer::__construct's default rule array, so the default Markdown/Parser renders list syntax as literal paragraph text.
Repro:
Side note: ListRule::shouldLex and OrderedListRule::shouldLex trigger on bare - / digit rather than - / digit. + separator, so -2 would render as a list item. Worth fixing as well.