From 1071179b306fc0d4eee65d968ca7c9d895a04e6e Mon Sep 17 00:00:00 2001 From: Po Chen Date: Sun, 9 Jul 2017 19:26:44 +1000 Subject: [PATCH] Update Angular2HTML.sublime-syntax Simplify regex and allow template refs without `=` --- Angular2HTML.sublime-syntax | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Angular2HTML.sublime-syntax b/Angular2HTML.sublime-syntax index 2318d95..388f251 100644 --- a/Angular2HTML.sublime-syntax +++ b/Angular2HTML.sublime-syntax @@ -441,7 +441,7 @@ contexts: pop: true tag-ng-template-attribute: - - match: '\s+((\*)([a-zA-Z][a-zA-Z0-9-]*)(=)\s*)' + - match: '\s+((\*)([a-zA-Z]\w*)(=\s*)?)' captures: 1: meta.attribute-with-value.template.html 2: punctuation.definition.template.html @@ -454,14 +454,7 @@ contexts: pop: true tag-ng-reference-attribute: - - match: '\s+((\#)([a-zA-Z]\w*))\s+' - captures: - 1: meta.attribute.reference.html - 2: punctuation.definition.reference.html - 3: entity.other.attribute-name.reference.html - - tag-ng-reference-assignment-attribute: - - match: '\s+((\#)([a-zA-Z]\w*))(=)\s*' + - match: '\s+((\#)([a-zA-Z]\w*)(=\s*)?)' captures: 1: meta.attribute.reference.html 2: punctuation.definition.reference.html @@ -522,7 +515,6 @@ contexts: - include: tag-event-attribute - include: tag-ng-template-attribute - include: tag-ng-reference-attribute - - include: tag-ng-reference-assignment-attribute - include: tag-ng-bind-attribute - include: tag-ng-on-attribute - include: tag-ng-bindon-attribute