Repository navigation
fix(svg): exclude direction isolates from label width - #16
Merged
Merged
Conversation
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.
Change
An Arabic step with 58 visible columns passed the generator until the author isolated an inline command-line flag. The directional characters made the measured width 60, so the CLI rejected the label. The renderer now omits the four Unicode direction-isolate characters when checking the visible text and keeps them in the SVG. The guide includes a JSON example. A label containing only isolates and spaces is rejected.
Rendered comparison
In Edge 157.0.4341.60 on Windows, the plain text of
--outputappeared visually asoutput--in Arabic and Hebrew step details. Left-to-right isolate (U+2066) and pop directional isolate (U+2069) preserved--outputacross both themes and the 360 px and 1280 px viewports. Eight plain and eight isolated cases were measured from the positions of the individual SVG characters. The version identifierAPI v2.1retained its order in all 16 cases. All measured labels fit inside the SVG and clear of their step markers. These were browser checks on local generated assets. Native-language review and assistive-technology testing remain open.Tests
The 58-column regression failed on
f223281. On the candidate, the exact Arabic label was accepted in both generated themes and an extra visible column was rejected. All 135 tests passed on disconnected Linux. Windows passed 133 tests and skipped two. The strict translation audit reported zero issues in 21 documents. The five checked-in English and Thai assets reproduced byte for byte.Related to #10. W3C guidance on bidi controls in plain text