[editor] Double-clicking selects can also support non-English tokens ?
Of course, this is not a big problem...
Normal behavior of \w+(ANSI characterSet) tokens
.aa#cc.bb[ee] {--radius:9px; padding:var(--radius, 5px); animation:abcde 1s linear;}
Double-clicking selects the tokens of .aa #cc ee --radius abcde, are perfectly correct!
Abnormal behavior of contains non-ANSI characterSet tokens
.测试.bb, .a测试a.bb, .aa#测试.bb[看看] {
--半径:9px; padding:var(--半径, 5px);
animation:_3分1透明到零2 1s; animation:转圈圈 1s;
}
@keyframes _3分1透明到零2 {33%{opacity:1} to{opacity:0}}
Double-clicking selects the tokens of .测试 .a测试a #测试 看看 --半径 转圈圈, would not behave as expected.
Screenshot
xx { --半径 : 9px; padding:var( --半径 , 5px); animation: 转圈圈 1s;}
Only when there are blank-spaces(\s) before and after the tokens can they be correctly selected.
- Test for
\p{L}: regex101.com/r/5zw6fF/latest
animation:_3分1透明到abc零2 1s;
To fix this we would need to replace all \w everywhere with \p{L} which is only supported since Chrome 64 and Firefox 78. We can do it once we migrate to ManifestV3.
To fix this we would need to replace all
\weverywhere with\p{L}..... once we migrate to ManifestV3.
Thanks! At the same time, new regular knowledge was learned!
A tip: \p{L} ≠ \w, \p{L} does not contain _ and \d
online test: regex101.com/r/5zw6fF/latest
Yeah, so I guess we'd use something like [-_\\\p{L}\d]