Skip to content

🐛 fix(markdown): keep image spaces in tables - #1646

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:fix/markdown-table-image-alt
Nov 6, 2026
Merged

gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:fix/markdown-table-image-alt

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

Markdown tables could change an image's alt text, source, or title when an attribute contained repeated spaces. The table cell's whitespace pass collapsed those spaces, changing the image on reparse.

For those images, table rendering uses HTML with character references for attribute spaces. The cell stays on one line, and the parsed image retains its attribute values.

Table cells collapse whitespace after rendering, which changed image attributes
containing repeated spaces on reparse. Emit those
images as HTML with character references so each attribute retains its value.
@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 0.4%

2 warnings

⚠️ 2 benchmarks with a significant change ran on different hardware

Their base and head results were measured on machines with a different CPU, core count or memory, so the changes might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

⚠️ 2 benchmarks with a significant change ran in a different software environment

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

See affected benchmarks

⚡ 1 improved benchmark
❌ 1 (👁 1) regressed benchmark
✅ 580 untouched benchmarks
⏩ 32 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ test_feature[linkify-traversal-wide-callbacks] 2.7 ms 2.5 ms +7.34%
👁 test_feature[select-relative-sibling] 41.1 µs 43.8 µs -6.08%

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-table-image-alt (7e07196) with main (def269b)

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 be9cadb into tox-dev:main Nov 6, 2026
66 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