Repository navigation
Spec 001 T030 follow-up: hyphenated names kept whole - #166
Merged
Merged
Conversation
A long token is now measured by its longest run between places Chromium breaks a line, so a hyphenated chemical name is no longer given a <wbr> mid-run. ci/measure/breaks.ts measures ASCII punctuation, hyphens and dashes between letters and digits, and checks breakBeside against it: Chromium breaks after -, U+2010, U+00AD, U+058A, U+2012, U+2013, U+2027, U+2E17, U+30FB and ?, before U+1806, and both sides of U+2014. U+2011 reaches the layout as - (FR-017 runs first), and is counted as the break Chromium makes after it in print. U+0085 is measured as a break and added to the spaces. A space with a combining mark ends a token as the space does; a hyphen with one is taken to join. The spaces comment names the en and em spaces rightly, and the numeric-reference branch is said to be defensive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Spec 001, a follow-up to T030, from #164's review.
-, U+2010, a soft hyphen, U+058A, U+2012, U+2013, U+2027, U+2E17, U+30FB and?, before U+1806, and on both sides of an em dash; not at U+2011, U+2015, U+2212,/or|, all measured byci/measure/breaks.ts, which fails if the code disagrees.1-phosphatidyl-1D-myo-inositol-4,5-bisphosphatewas broken into "1D" and "4,5"; it now prints whole.-before the layout, so it breaks in print as any hyphen does (recorded).Tests:
test/layout/html.test.ts(14); 455 in all. Mutants in tasks.md.🤖 Generated with Claude Code