Skip to content

Conversation

@cscheid
Copy link
Contributor

@cscheid cscheid commented Oct 15, 2025

Closes #6.

cscheid and others added 4 commits October 14, 2025 17:23
Added code span recognition to pipe table cell parsing. The block grammar
now properly handles backtick code spans like `|` within table cells by
repeating the inline grammar's code span parsing logic in the block context.

Changes:
- Added CODE_SPAN_START and CODE_SPAN_CLOSE external tokens to block grammar
- Implemented parse_code_span() in block scanner with lookahead for matching delimiters
- Added _pipe_table_code_span rule to parse code spans within table cells
- Updated scanner state serialization to track code span delimiter length

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
These tests verify that the parser correctly handles code spans containing
pipe characters within pipe tables. The fix in the block parser now properly
parses code spans to avoid treating pipes inside backticks as table
delimiters.

Test cases cover:
- Simple code span with single pipe
- Multiple code spans with pipes in different cells
- Mixed backtick delimiters (double and triple backticks)

All tests pass and match Pandoc's output.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@cscheid cscheid merged commit 2258ceb into main Oct 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing: (@) syntax

2 participants