Skip to content

🐛 fix(markdown): encode cell carriage returns - #1652

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:fix/markdown-round2-20261106
Nov 6, 2026
Merged

gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:fix/markdown-round2-20261106

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

Raw HTML nested in a Markdown pipe-table cell could contain a carriage return. The Markdown reader treated it as a row break, so the table changed on re-read.

The cell HTML writer now encodes CR as a numeric reference and keeps the existing LF collapse. Synthetic nested table and list cases cover the failure, and the original fuzz artifact now passes.

Raw HTML nested inside a pipe-table cell could carry a carriage return.
Markdown readers treated it as a row break and changed the table on re-read.

Use a numeric reference for CR while keeping cell LF collapse unchanged.
@gaborbernat gaborbernat added the bug Something isn't working label Nov 6, 2026
@codspeed

codspeed Bot commented Nov 6, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 25.33%

1 warning

⚠️ 1 benchmark with a significant change ran in a different software environment

Its base and head results were measured with a different OS or toolchain, such as compiler, runtime or library versions, so the change might come from this difference rather than from the code. Open the benchmark to see what changed.

See affected benchmarks

⚡ 1 improved benchmark
✅ 581 untouched benchmarks
⏩ 32 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ test_feature[shadow-slot-comments] 137.8 µs 109.9 µs +25.33%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing gaborbernat:fix/markdown-round2-20261106 (7a93fd8) with main (be9cadb)

Open in CodSpeed

Footnotes

  1. 32 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@gaborbernat
gaborbernat merged commit 905a331 into tox-dev:main Nov 6, 2026
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant