Table parsing fails
Describe the bug
/markdown_it/rules_block/table.py
- Header row checks for | (line 130-131)
- Body rows don't check for | (missing after line 198)
The fix is one line: if "|" not in lineText: break
Minimal Reproduction
from markdown_it import MarkdownIt
md = MarkdownIt('commonmark').enable('table')
content = """| A | B | |---|---| | 1 | 2 | Paragraph. """
tokens = md.parse(content) for t in tokens: if t.type == 'table_open': print(f'table_open: map={t.map}') # Expected: [0, 3], Actual: [0, 4]
Expected: Table ends at line 3, "Paragraph." is separate Actual: Table includes line 4, "Paragraph." parsed as table cell
Reproduce the bug
Minimal Reproduction
from markdown_it import MarkdownIt
md = MarkdownIt('commonmark').enable('table')
content = """| A | B | |---|---| | 1 | 2 | Paragraph. """
tokens = md.parse(content) for t in tokens: if t.type == 'table_open': print(f'table_open: map={t.map}') # Expected: [0, 3], Actual: [0, 4]
List your environment
No response