1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 15:32:28 +02:00

Mind whitespaces when double-clicking to select filter option value

This commit is contained in:
Raymond Hill 2020-10-16 17:13:55 -04:00
parent 4c5197322f
commit 32b08dc732
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -657,8 +657,8 @@ CodeMirror.registerHelper('fold', 'ubo-static-filtering', (( ) => {
// Better word selection for network filters
else if ( /\bnet\b/.test(token) ) {
if ( /\bvalue\b/.test(token) ) {
const l = /[^,.=|]*$/i.exec(s.slice(0, ch));
const r = /^[^#,|]*/i.exec(s.slice(ch));
const l = /[^ ,.=|]*$/i.exec(s.slice(0, ch));
const r = /^[^ #,|]*/i.exec(s.slice(ch));
if ( l && r ) {
beg = l.index;
end = ch + r[0].length;