Skip to content

Commit

Permalink
fix scriptlet match
Browse files Browse the repository at this point in the history
  • Loading branch information
slavaleleka committed Apr 2, 2024
1 parent 4514d5a commit 31e2e88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions syntaxes/adblock.yaml-tmlanguage
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ repository:
- include: "#exceptionScriptletRules"
- include: "#blockingScriptletRules"
exceptionScriptletRules:
match: "^(\\[.+?\\])?(.*?)(#@%#)(\\/\\/scriptlet)(\\()(.*)(\\)\\s*)$"
match: "^(\\[.+?\\])?(.*?)(#@%#)(\\/\\/scriptlet)(\\()(.*)(\\))\\s*$"
captures:
"1":
patterns:
Expand All @@ -239,7 +239,7 @@ repository:
blockingScriptletRules:
patterns:
# note: we look for a parameter that contain at least one non-whitespace character
- match: "^(\\[.+?\\])?(.*?)(#%#)(\\/\\/scriptlet)(\\()(.*\\S.*)(\\)\\s*)$"
- match: "^(\\[.+?\\])?(.*?)(#%#)(\\/\\/scriptlet)(\\()(.*\\S.*)(\\))\\s*$"
captures:
"1":
patterns:
Expand Down Expand Up @@ -595,8 +595,8 @@ repository:
- name: invalid.illegal.adblock
match: ".*"
emptyScriptletFunction:
match: (\\s*)
name: entity.name.section.adblock.empty-scriptlet
- name: entity.name.section.adblock.empty-scriptlet
match: "\\G\\s*\\z"
scriptletFunction:
patterns:
- match: ((['|"])(.*?)(?<!\\)(\2))(,\s*)?
Expand Down

0 comments on commit 31e2e88

Please sign in to comment.