Commit 8e489e4
authored
The parser was not properly recognizing blockquotes (>) and code blocks
(```) when they appeared directly inside list items without a preceding
blank line. This fix:
1. Detects when list item content starts with a block element marker
(blockquote, code fence, div, etc.) and parses it as blocks instead
of treating it as inline paragraph text.
2. Calculates proper content indent based on list type:
- Ordered lists use actual marker width (e.g., "1. " = 3 chars)
- Bullet and task lists use base marker width (2 chars)
This allows proper parsing of:
- `- > quote` (blockquote starting a bullet list item)
- `1. > quote` (blockquote in ordered list)
- List items with code fences on the first line
- Multi-line blockquotes with proper continuation
1 parent dd4460d commit 8e489e4
File tree
2 files changed
+662
-7
lines changed- src/Parser
- tests/TestCase
2 files changed
+662
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1647 | 1647 | | |
1648 | 1648 | | |
1649 | 1649 | | |
1650 | | - | |
1651 | | - | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
1652 | 1663 | | |
1653 | 1664 | | |
1654 | 1665 | | |
| |||
1718 | 1729 | | |
1719 | 1730 | | |
1720 | 1731 | | |
1721 | | - | |
1722 | | - | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
1723 | 1736 | | |
1724 | | - | |
1725 | | - | |
1726 | | - | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
1727 | 1746 | | |
1728 | 1747 | | |
1729 | 1748 | | |
| |||
0 commit comments