hyphenation 1.0.2
hyphenation: ^1.0.2 copied to clipboard
Correct, fast TeX-pattern hyphenation for Dart: pattern compilation, word breaking and greedy line breaking, with no Flutter dependency.
Changelog #
1.0.2 #
- The SDK constraint is now
^3.5.0, so the package resolves on older stable Dart releases. No API or behaviour changes.
1.0.1 #
- The LICENSE file is now the plain MIT text so pub.flutter-io.cn recognizes it; the
pattern-file notices moved to
NOTICE.md. - The package ships
example/example.dart. Hyphenator.cacheSplitParts, an opt-in bound-sharing cache of the partssplitreturns. Off by default: it retains each word's text a second time, cut up, in exchange for turning a repeatedsplitinto a map lookup.splitallocates its result once at its final size, and marking a word no longer allocates a lower-cased copy of it to probe an empty exception map.- Cached break offsets are retained in the narrowest integer width that holds them, rather than one tagged word each. They are still unmodifiable.
1.0.0 #
Initial release.
Hyphenator, splitting words with a compiled TeX pattern set, with an LRU cache over the words it has already seen.Hyphenator.fromSourceandTexHyphenationPatterns, compiling pattern file text into a trie held in flat typed arrays and shareable between hyphenators.HyphenLineBreaker, greedy width-aware line breaking driven by a caller supplied measurement function.DanglingWords, an allocation-free probe table of words to keep with the word that follows them.minifyTexPatterns, stripping a pattern file down to its\patternsand\hyphenationgroups.