fix: unbreak suggestions for emojis containing an underscore
- don't consider `_` as a "punct" or invalid character, some emojis like flags do contain it in their name Fixes: #8446
This commit is contained in:
parent
48b2b978e4
commit
6b7eea8db9
|
@ -796,7 +796,7 @@ Rectangle {
|
|||
function validSubstr(substr) {
|
||||
for(var i = 0; i < substr.length; i++) {
|
||||
var c = substr.charAt(i);
|
||||
if (Utils.isSpace(c) === true || Utils.isPunct(c) === true)
|
||||
if (Utils.isSpace(c) || Utils.isPunct(c))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -755,7 +755,6 @@ QtObject {
|
|||
|
||||
// Leave this function at the bottom of the file as QT Creator messes up the code color after this
|
||||
function isPunct(c) {
|
||||
return /(!|\@|#|\$|%|\^|&|\*|\(|\)|_|\+|\||-|=|\\|{|}|[|]|"|;|'|<|>|\?|,|\.|\/)/.test(c)
|
||||
return /(!|\@|#|\$|%|\^|&|\*|\(|\)|\+|\||-|=|\\|{|}|[|]|"|;|'|<|>|\?|,|\.|\/)/.test(c)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue