[-]
[+]
|
Changed |
_service:tar_git:harbour-neuntrainer-0.9.7.tar.gz/qml/pages/MainPage.qml
^
|
@@ -239,7 +239,9 @@
}
function learn(word, strip) {
if (word !== "") {
- const w = strip ? word.replace(/\W+/gi, "") : word;
+ //const w = strip ? word.replace(/\W+/gi, "") : word;
+ const stripre = /[\p{Alpha}\p{M}\p{Nd}\p{Pc}\p{Join_C}]+/gi; // unicode word characters
+ const w = strip ? word.replace(stripre, "") : word;
// https://forum.sailfishos.org/t/q-how-can-i-bring-predictive-text-input-to-learn-a-new-word/10402/6
// apparently accepting three times learns
//for ( var i=0; i<3; i++) { thread.acceptWord(w, false); }
|