[ReaderDictionary] clean stress marks from selection for dict search (#14856)

This commit is contained in:
David authored and GitHub committed 2026-01-27 14:20:22 +01:00
1 parent 7162708429
commit cd49bf335a
1 file changed
+2
@@ -858,6 +858,8 @@ function ReaderDictionary:cleanSelection(text, is_sane)
text = text:gsub("·", "") -- interpunct
text = text:gsub("|", "") -- pipe
text = text:gsub("↑", "") -- and up arrow, used in some dictionaries to indicate related words
text = text:gsub("ˈ", "") -- primary stress mark, used in phonetic transcriptions to indicate a stressed syllable
text = text:gsub("ˌ", "") -- secondary stress mark, used in phonetic transcriptions to indicate a weaker stressed syllable
-- Strip some common english grammatical construct
text = text:gsub("'s$", '') -- english possessive
-- Strip some common french grammatical constructs