File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ public void handleElement(Element elt) {
9393
9494 String source = attr .getValue ();
9595 RowColumnVector valueStart = attr .getValueSegment ().getRowColumnVector ();
96- if (JS_ATTRIBUTE .matcher (attr .getName ()).matches ()) {
96+ if (JS_ATTRIBUTE .matcher (attr .getName ()).matches () || isAngularTemplateAttributeName ( attr . getName ()) ) {
9797 snippetLoC =
9898 extractSnippet (
9999 2 ,
@@ -128,6 +128,12 @@ public LoCInfo getLoCInfo() {
128128 }
129129 }
130130
131+ private boolean isAngularTemplateAttributeName (String name ) {
132+ return name .startsWith ("[" ) && name .endsWith ("]" ) ||
133+ name .startsWith ("(" ) && name .endsWith (")" ) ||
134+ name .startsWith ("*ng" );
135+ }
136+
131137 /** List of HTML attributes whose value is interpreted as JavaScript. */
132138 private static final Pattern JS_ATTRIBUTE =
133139 Pattern .compile (
You can’t perform that action at this time.
0 commit comments