Skip to content

Commit 31e6665

Browse files
deathaxeprincemaple
authored andcommitted
Add support for exponentiation operator
Add dedicated pattern primarily to support ligatures.
1 parent 11b2d50 commit 31e6665

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

NgxHTML.sublime-syntax

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ contexts:
553553
scope: punctuation.terminator.expression.ngx
554554
- match: '[!=]==?|[<>]=?'
555555
scope: keyword.operator.comparison.ngx
556-
- match: '[-+*/%]'
556+
- match: '\*\*|[-+*/%]'
557557
scope: keyword.operator.arithmetic.ngx
558558
- match: '&&|\|\||!'
559559
scope: keyword.operator.logical.ngx

tests/syntax_test_scopes.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@
611611
https://angular.dev/guide/templates/expression-syntax#what-operators-are-supported
612612
-->
613613

614-
{{ - + * / % === !== == != = < <= >= > && || ! ?? }}
614+
{{ - + * / % === !== == != = < <= >= > && || ! ?? ** }}
615615
<!-- ^ keyword.operator.arithmetic.ngx -->
616616
<!-- ^ keyword.operator.arithmetic.ngx -->
617617
<!-- ^ keyword.operator.arithmetic.ngx -->
@@ -630,6 +630,7 @@
630630
<!-- ^^ keyword.operator.logical.ngx -->
631631
<!-- ^ keyword.operator.logical.ngx -->
632632
<!-- ^^ keyword.operator.null-coalescing.ngx -->
633+
<!-- ^^ keyword.operator.arithmetic.ngx -->
633634

634635
<!-- ternary -->
635636
{{ foo ? bar : baz }}

0 commit comments

Comments
 (0)