Release v0.6.60: allow apostrophes in custom corrections

This commit is contained in:
agrynco committed 2026-11-09 11:59:49 +02:00
1 parent 4d8d8d47b9
commit 011664cc53
12 files changed
+49 -18

No files matched your search

+2 -3
View File
@@ -138,10 +138,9 @@ void validateSettings(const Settings &s)
valid |= !from.empty() && !to.empty() && from.size() <= 32 && to.size() <= 32 &&
from == lower(from) && to == lower(to) && from != to &&
from.find_first_not_of(alphabet) == from.npos &&
to.find_first_not_of(std::wstring(alphabet) + L" ") == to.npos &&
to.front() != L' ' && to.back() != L' ' && to.find(L" ") == to.npos;
validAutoCorrection(to, alphabet);
if (!valid)
throw std::runtime_error("Use a lowercase typo of 1-32 letters and a different correction of 1-32 characters in the same language. Single spaces between correction words are allowed.");
throw std::runtime_error("Use a lowercase typo of 1-32 letters and a different correction of 1-32 characters in the same language. Single spaces between words and apostrophes between letters are allowed.");
}
for (const auto &[language, words] : s.autoWords)
{