feat: CSS-compatible workBreak, hyphens and hyphenateChracter - #3288
Open
exoego wants to merge 2 commits into
Open
feat: CSS-compatible workBreak, hyphens and hyphenateChracter#3288exoego wants to merge 2 commits into
exoego wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: 23f1497 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
exoego
force-pushed
the
custom-hyphenation
branch
from
January 27, 2026 13:56
15b555f to
4874827
Compare
exoego
force-pushed
the
custom-hyphenation
branch
2 times, most recently
from
April 12, 2026 04:40
ee0c48b to
b9f8ed3
Compare
|
I came across this draft PR and it seems to address the word-breaking issue in react-pdf. From a quick look/testing, it behaves closer to native CSS word-break support, which has been a common limitation. Would love your review on whether this approach makes sense. |
exoego
force-pushed
the
custom-hyphenation
branch
2 times, most recently
from
April 16, 2026 06:42
1d0641e to
3e415a5
Compare
exoego
commented
Apr 16, 2026
| @@ -1,9 +1,60 @@ | |||
| import LineBreaker from 'linebreak'; | |||
Contributor
Author
There was a problem hiding this comment.
It is used in pdfkit
https://github.com/foliojs/linebreak
exoego
force-pushed
the
custom-hyphenation
branch
from
April 16, 2026 09:30
3e415a5 to
2d04568
Compare
exoego
marked this pull request as ready for review
April 16, 2026 09:37
exoego
marked this pull request as draft
May 3, 2026 06:10
exoego
marked this pull request as ready for review
May 3, 2026 06:26
# Conflicts: # packages/layout/tests/text/layoutText.test.ts # packages/textkit/src/engines/linebreaker/index.ts
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.
-#638This PR leverages https://github.com/foliojs/linebreak which is used in foliojs/pdfkit
Long paragrah was borrowed from MDN for
word-break