Skip to content

Commit

Permalink
Merge pull request AdguardTeam#64 from scripthunter7/from-to-method-m…
Browse files Browse the repository at this point in the history
…odifiers

Add support for `from`, `to` and `method` modifiers
  • Loading branch information
ameshkov authored Mar 15, 2023
2 parents dd36d41 + c6f5ae1 commit ab43ec7
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion syntaxes/adblock.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@
}
},
{
"match": "(domain|denyallow)(=)([^,]+)",
"match": "(domain|denyallow|from|to)(=)([^,]+)",
"captures": {
"1": {
"name": "keyword.other.adblock"
Expand Down Expand Up @@ -748,6 +748,33 @@
}
}
},
{
"match": "(method)(=)([^,]+)",
"captures": {
"1": {
"name": "keyword.other.adblock"
},
"2": {
"name": "keyword.operator.adblock"
},
"3": {
"patterns": [
{
"match": "(?i)(connect|delete|get|head|options|patch|post|put)",
"name": "string.unquoted.adblock"
},
{
"match": "~|\\|",
"name": "keyword.operator.adblock"
},
{
"match": ".+",
"name": "invalid.illegal.method-value"
}
]
}
}
},
{
"match": "(inline-script|inline-font|mp4|empty|badfilter|genericblock|generichide|network|popup|popunder|important|cookie|csp|replace|stealth|removeparam|queryprune)",
"name": "keyword.other.adblock"
Expand Down

0 comments on commit ab43ec7

Please sign in to comment.