mattdesl / mattdesl/word-wrapper
Line breaking should use Unicode line breaking algorithm
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 72
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
The rules for breaking lines are more complicated than a naive test against white space (for instance, en-dashes and em-dashes are valid points to break text on, although they're not whitespace): this library should use the UAX #14 line-breaking logic provided by the NPM [linebreak](https://www.npmjs.com/package/linebreak) module (see the [canwrap](https://github.com/stuartpb/canwrap/blob/master/index.js) library for an example implementation).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the current line-breaking implementation in word-wrapper and the canwrap index.js example referenced in the issue. Compare that approach with the NPM linebreak module and UAX #14 behavior; the work is done when wrapping follows Unicode line-breaking opportunities, including non-whitespace points such as en-dashes and em-dashes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- content
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100