mirror of
https://github.com/DandelionSprout/adfilt.git
synced 2026-10-04 22:04:19 +01:00
Add files via upload
This commit is contained in:
@@ -851,11 +851,17 @@ def prepare_ag(lines) -> str:
|
||||
|
||||
# until this is done: https://github.com/AdguardTeam/CoreLibs/issues/152
|
||||
line = re.sub(
|
||||
r"[$,]doc.*",
|
||||
"\$doc",
|
||||
"$empty,important",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
",doc",
|
||||
",empty,important",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
"Dandelion Sprout's Anti-Malware List",
|
||||
"Dandelion Sprout's Anti-Malware List (for AdGuard)",
|
||||
@@ -886,12 +892,6 @@ def prepare_ag(lines) -> str:
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"[$,]domain$",
|
||||
"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\|~ Warning.*",
|
||||
"",
|
||||
@@ -910,6 +910,12 @@ def prepare_ag(lines) -> str:
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"([$,])domain$",
|
||||
"",
|
||||
line
|
||||
)
|
||||
|
||||
text += line + '\r\n'
|
||||
|
||||
return text
|
||||
@@ -928,9 +934,14 @@ def prepare_abp(lines) -> str:
|
||||
# remove or modifiy entries with unsupported modifiers
|
||||
for line in lines:
|
||||
|
||||
# remove $document modifier from the rule
|
||||
line = re.sub(
|
||||
r"[$,]doc.*",
|
||||
"\$doc",
|
||||
"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
",doc",
|
||||
"",
|
||||
line
|
||||
)
|
||||
@@ -984,12 +995,6 @@ def prepare_abp(lines) -> str:
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"[$,]domain$",
|
||||
"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\|~ Warning.*",
|
||||
"",
|
||||
@@ -1009,7 +1014,13 @@ def prepare_abp(lines) -> str:
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\$doc.*",
|
||||
"\^,",
|
||||
"^$",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"([$,])domain$",
|
||||
"",
|
||||
line
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user