Skip to content

Commit

Permalink
fix: greedy parsing of xml attribute name
Browse files Browse the repository at this point in the history
  • Loading branch information
Desdaemon committed Apr 9, 2024
1 parent 498bb81 commit 94b02f4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions syntaxes/gen/odoo-xml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repository:
begin: |
(?x)
(?:^|\s+) (?# start-of-line or skip leading whitespace)
(t- (?: call | valuef | attf- \S+ | slot | ref))
(t- (?: call | valuef | attf- \S+? | slot | ref))
\s* = (['"])
end: (\2)
beginCaptures:
Expand All @@ -37,7 +37,7 @@ repository:
plain: # Attributes that should be opted out of injection
begin: |
(?x)(?:^|\s+)
(t- (?: name | inherit (?: -mode)? | nocache \S* | set-slot | translation))
(t- (?: name | inherit (?: -mode)? | nocache \S*? | set-slot | translation))
\s* = (['"])
end: (\2)
beginCaptures:
Expand All @@ -52,7 +52,7 @@ repository:
js: # Attributes that only make sense in a JS context, e.g. t-on-{event}
begin: |
(?x)(?:^|\s+)
(t- (?: on- \S+ | component | props | portal))
(t- (?: on- \S+? | component | props | portal))
\s* = (['"])
end: (\2)
beginCaptures:
Expand All @@ -70,7 +70,7 @@ repository:
(?x)(?:^|\s+)
(required | include | readonly | (?:column_)? invisible | (?:filter_)? domain
| context | eval | options | attrs
| (?: t | decoration) - \S+)
| (?: t | decoration) - \S+?)
\s* = (['"])
end: (\2)
beginCaptures:
Expand Down Expand Up @@ -134,7 +134,7 @@ repository:
operators:
match: |
(?x)
(?: === | !== | delete | \|\|
(?: ===? | !==? | delete | \|\|
| \?\?= (?# Nullish assignment)
| [?+-]{2} (?# Nullish coalescing, increment, decrement)
| [!?]\.? (?# Negation, ternary, optional chaining)
Expand Down

0 comments on commit 94b02f4

Please sign in to comment.