File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
crates/emmylua_parser_desc/src Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -638,7 +638,7 @@ impl MdParser {
638
638
}
639
639
640
640
let text = reader. tail_text ( ) ;
641
- if text. len ( ) >= 4 && is_blank ( & text[ ..4 ] ) {
641
+ if text. len ( ) >= 4 && text . is_char_boundary ( 4 ) && is_blank ( & text[ ..4 ] ) {
642
642
// List marker followed by a space, then 4 more spaces
643
643
// is parsed as a list marker followed by a space,
644
644
// then code block.
@@ -1522,6 +1522,10 @@ mod tests {
1522
1522
---
1523
1523
--- Continuation 2
1524
1524
---
1525
+ --- -测试 <- not a list
1526
+ ---
1527
+ --- - 测试 <- list
1528
+ ---
1525
1529
--- -
1526
1530
--- List that starts with empty string
1527
1531
---
@@ -1647,7 +1651,11 @@ mod tests {
1647
1651
---
1648
1652
--- <CodeBlock>Continuation 2</CodeBlock>
1649
1653
---
1650
- --- </Scope></Scope><Scope><Markup>-</Markup>
1654
+ --- </Scope></Scope>-测试 <- not a list
1655
+ ---
1656
+ --- <Scope><Markup>-</Markup> 测试 <- list
1657
+ ---
1658
+ --- </Scope><Scope><Markup>-</Markup>
1651
1659
--- List that starts with empty string
1652
1660
---
1653
1661
--- </Scope> Not list
You can’t perform that action at this time.
0 commit comments