refactor: unify punctuation trimming to handle footnotes in hyphenation logic

This commit is contained in:
Arthur Tazhitdinov
2026-01-15 21:48:32 +05:00
parent 32cffaf504
commit f02872542f
4 changed files with 38 additions and 50 deletions

View File

@@ -128,8 +128,7 @@ std::string positionsToHyphenated(const std::string& word, const std::vector<siz
std::vector<size_t> hyphenateWordWithHyphenator(const std::string& word, const LanguageHyphenator& hyphenator) {
auto cps = collectCodepoints(word);
trimSurroundingPunctuation(cps);
trimTrailingFootnoteReference(cps);
trimSurroundingPunctuationAndFootnote(cps);
return hyphenator.breakIndexes(cps);
}