Repository navigation
Concatenate the text segments of image alt text - #163
Merged
Merged
Conversation
The HTML renderer joined the plain text segments of each line of an image description with newlines and the lines with nothing, the reverse of what is intended: `` gave alt="foo \nbar" instead of alt="foo bar" (spec examples 520, 573-577, 585 and 589). Segments are now concatenated and lines (hard breaks) separated by newlines.
This was referenced Oct 1, 2026
Contributor
Author
|
Automated review: Codex CLI ( Verdict: signed off, no changes requested.
Codex could not run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #152. Found by differential fuzzing against markdown-it-py (
commonmarkpreset).Bug: the HTML renderer joined the plain-text segments of each line of an image description with newlines, and joined the lines with nothing. That is the reverse of what's intended.
Repro:
gavealt="foo \nbar". Expectedalt="foo bar".Fix: concatenate the segments of each line, and separate lines (hard breaks) with newlines, reusing
joined_stringwithIter::join.Spec examples fixed: 520, 573, 574, 575, 576, 577, 585, 589.
Tests:
src/cmark_html/image_alt_text_test.mbt.Depends on: nothing, independent of the other PRs.