Fix english hyphenation

This commit is contained in:
jpirnay
2026-03-16 11:51:28 +01:00
parent 7a940d0a4b
commit e4b0abec03
+2 -2
View File
@@ -102,7 +102,7 @@ void appendSegmentPatternBreaks(const std::vector<CodepointInfo>& cps, const Lan
void appendApostropheContractionBreaks(const std::vector<CodepointInfo>& cps,
std::vector<Hyphenator::BreakInfo>& outBreaks) {
constexpr size_t kMinLeftSegmentLen = 3;
constexpr size_t kMinRightSegmentLen = 2;
constexpr size_t kMinRightSegmentLen = 3;
size_t segmentStart = 0;
for (size_t i = 0; i < cps.size(); ++i) {
@@ -123,7 +123,7 @@ void appendApostropheContractionBreaks(const std::vector<CodepointInfo>& cps,
}
}
// Avoid stranding short clitics like "l'"/"d'" or tiny suffixes like "'t".
// Avoid stranding short clitics like "l'"/"d'" or tiny suffixes like "'t"/"'re"/"'ve"/"'ll".
if (leftPrefixLen >= kMinLeftSegmentLen && rightSuffixLen >= kMinRightSegmentLen) {
outBreaks.push_back({cps[i + 1].byteOffset, false});
}