mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-04 16:47:15 +02:00
Fix detection of unfilled filter list fields
Related feedback: https://github.com/uBlockOrigin/uBlock-discussions/discussions/781#discussioncomment-7503866
This commit is contained in:
parent
cd430386f5
commit
b8193ea5f9
@ -68,7 +68,7 @@ const extractMetadataFromList = (content, fields) => {
|
||||
const re = new RegExp(`^(?:! *|# +)${field.replace(/-/g, '(?: +|-)')}: *(.+)$`, 'im');
|
||||
const match = re.exec(head);
|
||||
let value = match && match[1].trim() || undefined;
|
||||
if ( value !== undefined && /^%.+%$/.test(value) ) {
|
||||
if ( value !== undefined && value.startsWith('%') ) {
|
||||
value = undefined;
|
||||
}
|
||||
field = field.toLowerCase().replace(
|
||||
@ -169,7 +169,7 @@ const isDiffUpdatableAsset = content => {
|
||||
'Diff-Path',
|
||||
]);
|
||||
return typeof data.diffPath === 'string' &&
|
||||
/^[^%].*[^%]$/.test(data.diffPath);
|
||||
data.diffPath.startsWith('%') === false;
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user