Skip to content

Commit

Permalink
Fix #21 and Fix #22
Browse files Browse the repository at this point in the history
  • Loading branch information
ameshkov committed May 16, 2019
1 parent c43d1df commit cb6057e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Change Log

- Improved the $domain modifier performance: #26
- Added $redirect modifier support: #21
- Added $rewrite modifier support: #22

## 0.0.15
- Added ABP snippets syntax support: #14
Expand Down
33 changes: 33 additions & 0 deletions syntaxes/adblock.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,39 @@
}
}
},
{
"match": "(redirect)(=)([^,]+)",
"name": "keyword.other.adblock",
"captures": {
"1": {
"name": "keyword.other.adblock"
},
"2": {
"name": "keyword.operator.adblock"
},
"3": {
"name": "string.unquoted.adblock"
}
}
},
{
"match": "(rewrite)(=)(abp-resource:)([^,]+)",
"name": "keyword.other.adblock",
"captures": {
"1": {
"name": "keyword.other.adblock"
},
"2": {
"name": "keyword.operator.adblock"
},
"3": {
"name": "keyword.other.adblock"
},
"4": {
"name": "string.unquoted.adblock"
}
}
},
{
"match": "(csp)(=)([^,]+)",
"name": "keyword.other.adblock",
Expand Down
6 changes: 6 additions & 0 deletions test_rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ $websocket,domain=example.org
! Csp
||example.org^$csp=frame-src 'none'

! Redirect
||example.org^$redirect=google-analytics.com/ga.js

! Rewrite
||example.org^$rewrite=abp-resource:blank-html

!
! Basic rules (invalid)
!
Expand Down

0 comments on commit cb6057e

Please sign in to comment.