This commit is contained in:
saslv 2026-02-03 18:32:50 +03:00 committed by GitHub
commit 7cb0434b30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1353 additions and 2 deletions

View File

@ -16,4 +16,5 @@ fi
git ls-files --exclude-standard ${GIT_LS_FILES_FLAGS} \ git ls-files --exclude-standard ${GIT_LS_FILES_FLAGS} \
| grep -E '\.(c|cpp|h|hpp)$' \ | grep -E '\.(c|cpp|h|hpp)$' \
| grep -v -E '^lib/EpdFont/builtinFonts/' \ | grep -v -E '^lib/EpdFont/builtinFonts/' \
| grep -v -E '^lib/Epub/Epub/hyphenation/generated/' \
| xargs -r clang-format -style=file -i | xargs -r clang-format -style=file -i

View File

@ -9,6 +9,7 @@
#include "generated/hyph-es.trie.h" #include "generated/hyph-es.trie.h"
#include "generated/hyph-fr.trie.h" #include "generated/hyph-fr.trie.h"
#include "generated/hyph-ru.trie.h" #include "generated/hyph-ru.trie.h"
#include "generated/hyph-uk.trie.h"
namespace { namespace {
@ -18,15 +19,17 @@ LanguageHyphenator frenchHyphenator(fr_patterns, isLatinLetter, toLowerLatin);
LanguageHyphenator germanHyphenator(de_patterns, isLatinLetter, toLowerLatin); LanguageHyphenator germanHyphenator(de_patterns, isLatinLetter, toLowerLatin);
LanguageHyphenator russianHyphenator(ru_ru_patterns, isCyrillicLetter, toLowerCyrillic); LanguageHyphenator russianHyphenator(ru_ru_patterns, isCyrillicLetter, toLowerCyrillic);
LanguageHyphenator spanishHyphenator(es_patterns, isLatinLetter, toLowerLatin); LanguageHyphenator spanishHyphenator(es_patterns, isLatinLetter, toLowerLatin);
LanguageHyphenator ukrainianHyphenator(uk_patterns, isCyrillicLetter, toLowerCyrillic);
using EntryArray = std::array<LanguageEntry, 5>; using EntryArray = std::array<LanguageEntry, 6>;
const EntryArray& entries() { const EntryArray& entries() {
static const EntryArray kEntries = {{{"english", "en", &englishHyphenator}, static const EntryArray kEntries = {{{"english", "en", &englishHyphenator},
{"french", "fr", &frenchHyphenator}, {"french", "fr", &frenchHyphenator},
{"german", "de", &germanHyphenator}, {"german", "de", &germanHyphenator},
{"russian", "ru", &russianHyphenator}, {"russian", "ru", &russianHyphenator},
{"spanish", "es", &spanishHyphenator}}}; {"spanish", "es", &spanishHyphenator},
{"ukrainian", "uk", &ukrainianHyphenator}}};
return kEntries; return kEntries;
} }

File diff suppressed because it is too large Load Diff