@@ -111,6 +111,38 @@ describe 'directive grammar', ->
111111
112112 expect (lines[0 ][3 ]).toEqual value : ' ng:controller' , scopes : [' text.html.angular' , ' meta.tag.inline.any.html' , ' meta.attribute.html.angular' , ' entity.other.attribute-name.html.angular' ]
113113
114+ it ' tokenizes data- prefixed angular element' , ->
115+ lines = grammar .tokenizeLines '''
116+ <data-ng-include src=""></data-ng-include>
117+ '''
118+
119+ expect (lines[0 ][1 ]).toEqual value : ' data-ng-include' , scopes : [' text.html.angular' , ' meta.tag.block.any.html' , ' entity.name.tag.block.any.html.angular' ]
120+ expect (lines[0 ][5 ]).toEqual value : ' data-ng-include' , scopes : [' text.html.angular' , ' meta.tag.block.any.html' , ' entity.name.tag.block.any.html.angular' ]
121+
122+ it ' tokenizes x- prefixed angular element' , ->
123+ lines = grammar .tokenizeLines '''
124+ <x-ng-include src=""></x-ng-include>
125+ '''
126+
127+ expect (lines[0 ][1 ]).toEqual value : ' x-ng-include' , scopes : [' text.html.angular' , ' meta.tag.block.any.html' , ' entity.name.tag.block.any.html.angular' ]
128+ expect (lines[0 ][5 ]).toEqual value : ' x-ng-include' , scopes : [' text.html.angular' , ' meta.tag.block.any.html' , ' entity.name.tag.block.any.html.angular' ]
129+
130+ it ' tokenizes _ suffixed angular element' , ->
131+ lines = grammar .tokenizeLines '''
132+ <ng_include src=""></ng_include>
133+ '''
134+
135+ expect (lines[0 ][1 ]).toEqual value : ' ng_include' , scopes : [' text.html.angular' , ' meta.tag.block.any.html' , ' entity.name.tag.block.any.html.angular' ]
136+ expect (lines[0 ][5 ]).toEqual value : ' ng_include' , scopes : [' text.html.angular' , ' meta.tag.block.any.html' , ' entity.name.tag.block.any.html.angular' ]
137+
138+ it ' tokenizes : suffixed angular element' , ->
139+ lines = grammar .tokenizeLines '''
140+ <ng:include src=""></ng:include>
141+ '''
142+
143+ expect (lines[0 ][1 ]).toEqual value : ' ng:include' , scopes : [' text.html.angular' , ' meta.tag.block.any.html' , ' entity.name.tag.block.any.html.angular' ]
144+ expect (lines[0 ][5 ]).toEqual value : ' ng:include' , scopes : [' text.html.angular' , ' meta.tag.block.any.html' , ' entity.name.tag.block.any.html.angular' ]
145+
114146 describe ' angular expression' , ->
115147 it ' tokenizes angular expressions in HTML tags' , ->
116148 lines = grammar .tokenizeLines '''
0 commit comments