Files
outline/shared
Tom MoorandClaude Opus 4.8 c59e8bcc3f fix: Encode code & math fences in table cells with <br> to avoid breaking rows (#12569)
* fix: Encode code & math fences in table cells with <br> to avoid breaking rows

Code and LaTeX fences inside table cells emitted literal newlines during
Markdown serialization, breaking the single-line table-row structure and
corrupting the whole table. Serialize them on a single line using <br> for
line breaks (and escaped pipes) when inside a table, matching the existing
handling for lists and hard breaks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix: Escape backslashes in table-cell code & math fences

CodeQL flagged incomplete string escaping: escaping pipes as \| without
escaping pre-existing backslashes leaves the encoding ambiguous. Escape the
backslash (the escape character) and pipe together in a single pass so cell
content cannot break out of the column.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* test: Cover math block table-cell serialization

Add a test mirroring the code fence case to guard the MathBlock half of the
table-cell <br> encoding and pipe/backslash escaping.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 23:03:14 -04:00
..
2026-06-12 21:42:16 -04:00
2026-06-12 21:42:16 -04:00
2026-06-12 21:42:16 -04:00
2026-06-12 21:42:16 -04:00