[gtksourceview: 9/14] typescript.lang: Fix non-null assertion operator matching inequality



commit 24a6db85052ad66b18c1d41941b0bac49518095e
Author: Jeffery To <jeffery to gmail com>
Date:   Sat Jun 6 05:46:39 2020 +0800

    typescript.lang: Fix non-null assertion operator matching inequality
    
    This prevents the non-null assertion operator (!, e.g. a!.prop) from
    matching the ! symbol in inequality operators (e.g. a!=prop).

 data/language-specs/typescript-js-expressions.lang | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/data/language-specs/typescript-js-expressions.lang 
b/data/language-specs/typescript-js-expressions.lang
index 407c23bf..ff98e8b8 100644
--- a/data/language-specs/typescript-js-expressions.lang
+++ b/data/language-specs/typescript-js-expressions.lang
@@ -97,7 +97,7 @@
     -->
 
     <context id="_non-null-assertion-operators" style-ref="typescript:non-null-assertion-operator">
-      <match>!</match>
+      <match>!(?!=)</match>
     </context> <!-- /_non-null-assertion-operators -->
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]