Repository navigation
Conversation
|
Independent check at A remaining pre-existing case is code nested in a list or quote within the cell: <tr><td><ul><li><code>a|b</code></li></ul></td><td>choice</td></tr>
<tr><td><blockquote><p><code>a|b</code></p></blockquote></td><td>choice</td></tr>AnyDoc retains these as | - `a|b` | choice |
| `a|b` | choice |The table reader splits at the inner pipe and drops This could be covered here or in a follow-up by preserving table context through nested cell content; the direct-cell change itself fixes the reported reproduction. I found no regression in the 20-row comparison (base 0/20 exact-preservation checks, PR 12/20). AI-only local verification on macOS arm64 / Python 3.14.10, |
Description
When AnyDoc converts an EPUB table containing code such as
a|b, the generated Markdown table treats the pipe as a column separator. The cell after the code can disappear. Escape each pipe inside a code span emitted directly in a table cell, including a code block converted to a span. A source backslash is preserved because the table parser consumes the added escape.Human Involvement
Related Issue
Fixes #7689.
Type of Change
Testing
AnyDocConverterintest_epub_table_preserves_pipes_in_inline_and_block_code. The regression failed on the branch base.pytest -o addopts='' -q tests/parse/test_anydoc_table_code.py tests/parse/test_anydoc_note_anchor_links.py tests/parse/test_directory_parser_routing.py tests/parse/test_document_parser_threading.py(29 passed). Also rendered the fixture with cmark-gfm and markdown-it-py, checking both columns and the source backslash.