From e4b0abec0396a2e408f55474906a27ec9a229477 Mon Sep 17 00:00:00 2001 From: jpirnay Date: Mon, 16 Mar 2026 11:51:28 +0100 Subject: [PATCH] Fix english hyphenation --- lib/Epub/Epub/hyphenation/Hyphenator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Epub/Epub/hyphenation/Hyphenator.cpp b/lib/Epub/Epub/hyphenation/Hyphenator.cpp index eb3bdec2..9d3d12d2 100644 --- a/lib/Epub/Epub/hyphenation/Hyphenator.cpp +++ b/lib/Epub/Epub/hyphenation/Hyphenator.cpp @@ -102,7 +102,7 @@ void appendSegmentPatternBreaks(const std::vector& cps, const Lan void appendApostropheContractionBreaks(const std::vector& cps, std::vector& 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& 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}); }