Skip to content

Commit

Permalink
Fix media queries
Browse files Browse the repository at this point in the history
  • Loading branch information
scripthunter7 authored Dec 13, 2022
1 parent 2261166 commit b815876
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
26 changes: 26 additions & 0 deletions syntaxes/adblock.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,32 @@
},
"cssStyle": {
"patterns": [
{
"match": "(@media[\\s]+[^\\{]*)(\\{)([\\s]*[^\\{]*)(\\{)([\\s]*[^\\}]*)(\\})[\\s]*(\\})",
"captures": {
"1": {
"name": "entity.name.function.adblock"
},
"2": {
"name": "punctuation.section.adblock"
},
"3": {
"name": "entity.name.function.adblock"
},
"4": {
"name": "punctuation.section.adblock"
},
"5": {
"name": "string.quoted.adblock"
},
"6": {
"name": "punctuation.section.adblock"
},
"7": {
"name": "punctuation.section.adblock"
}
}
},
{
"match": "([^{}]+)\\s*((\\{)(.+?)(\\}))",
"captures": {
Expand Down
6 changes: 5 additions & 1 deletion test_rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,4 +336,8 @@ $removeheader=location,domain=zannn.top|innal.top
/telsu\.fi\/(?![^>].*\.(jpg|png|svg|ico)$).+/$image,domain=www.telsu.fi

! https://github.com/ameshkov/VscodeAdblockSyntax/issues/10
한글코딩.org##div
한글코딩.org##div

! https://github.com/ameshkov/VscodeAdblockSyntax/issues/56
rootblog.pl#$#@media all and (min-width: 1200px) { a[href*="news.google.com/publications/"] { visibility: hidden !important; } }
rootblog.pl#$#@media (min-width: 1200px) { a[href*="news.google.com/publications/"] { visibility: hidden !important; } }

0 comments on commit b815876

Please sign in to comment.