File tree Expand file tree Collapse file tree
vscode-ng-language-service/syntaxes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,13 +13,18 @@ export const TemplateTag: GrammarDefinition = {
1313 injectionSelector : 'L:text.html#meta.tag -comment' ,
1414 patterns : [
1515 { include : '#inlineComments' } ,
16+ { include : '#leadingSpace' } ,
1617 { include : '#twoWayBinding' } ,
1718 { include : '#propertyBinding' } ,
1819 { include : '#eventBinding' } ,
1920 { include : '#templateBinding' } ,
2021 { include : '#standardAttribute' } ,
2122 ] ,
2223 repository : {
24+ leadingSpace : {
25+ match : / ^ \s + / ,
26+ name : 'template.tag.ng' ,
27+ } ,
2328 standardAttribute : {
2429 begin : / ( [ - _ a - z A - Z 0 - 9 . $ : ] + ) ( = ) ( [ " ' ] ) / ,
2530 beginCaptures : {
Original file line number Diff line number Diff line change 55 {
66 "include" : " #inlineComments"
77 },
8+ {
9+ "include" : " #leadingSpace"
10+ },
811 {
912 "include" : " #twoWayBinding"
1013 },
2225 }
2326 ],
2427 "repository" : {
28+ "leadingSpace" : {
29+ "match" : " ^\\ s+" ,
30+ "name" : " template.tag.ng"
31+ },
2532 "standardAttribute" : {
2633 "begin" : " ([-_a-zA-Z0-9.$:]+)(=)([\" '])" ,
2734 "beginCaptures" : {
Original file line number Diff line number Diff line change 801801><div
802802#^^^^^ template.tag.ng
803803> // comment 0
804- #^^ template.tag.ng
804+ #^^ template.tag.ng template.tag.ng
805805# ^^ template.tag.ng comment.line.double-slash.ts punctuation.definition.comment.ts
806806# ^^^^^^^^^^ template.tag.ng comment.line.double-slash.ts
807807> /* comment 1 */
808- #^^ template.tag.ng
808+ #^^ template.tag.ng template.tag.ng
809809# ^^ template.tag.ng comment.block.ts punctuation.definition.comment.ts
810810# ^^^^^^^^^^^ template.tag.ng comment.block.ts
811811# ^^ template.tag.ng comment.block.ts punctuation.definition.comment.ts
812812> attr1="value1"
813- #^^ template.tag.ng
813+ #^^ template.tag.ng template.tag.ng
814814# ^^^^^ template.tag.ng meta.attribute.standard.html entity.other.attribute-name.html
815815# ^ template.tag.ng meta.attribute.standard.html punctuation.separator.key-value.html
816816# ^ template.tag.ng meta.attribute.standard.html string.quoted.html punctuation.definition.string.begin.html
817817# ^^^^^^ template.tag.ng meta.attribute.standard.html variable.other.readwrite.ts
818818# ^ template.tag.ng meta.attribute.standard.html string.quoted.html punctuation.definition.string.end.html
819819> /*
820- #^^ template.tag.ng
820+ #^^ template.tag.ng template.tag.ng
821821# ^^ template.tag.ng comment.block.ts punctuation.definition.comment.ts
822822> comment 2
823823#^^^^^^^^^^^^^^^ template.tag.ng comment.block.ts
827827#^^ template.tag.ng comment.block.ts
828828# ^^ template.tag.ng comment.block.ts punctuation.definition.comment.ts
829829> attr2="value2"
830- #^^ template.tag.ng
830+ #^^ template.tag.ng template.tag.ng
831831# ^^^^^ template.tag.ng meta.attribute.standard.html entity.other.attribute-name.html
832832# ^ template.tag.ng meta.attribute.standard.html punctuation.separator.key-value.html
833833# ^ template.tag.ng meta.attribute.standard.html string.quoted.html punctuation.definition.string.begin.html
You can’t perform that action at this time.
0 commit comments