Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 736dc45

Browse files
committed
Merge pull request #52 from vlki/highlighting-repeat-start-end
Correct highlighting of ng-repeat-start and ng-repeat-end attributes
2 parents 06bd685 + 39b1a20 commit 736dc45

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

grammars/angularjs.cson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
'non-bindable|' +
117117
'open|options|' +
118118
'paste|pluralize|' +
119-
'readonly|repeat|repeat-start|repeat-end|' +
119+
'readonly|repeat-start|repeat-end|repeat|' +
120120
'selected|show|src|srcset|style|strict-di|submit|switch|switch-when|switch-default|' +
121121
'transclude|' +
122122
'value|' +

spec/grammar-spec.coffee

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ describe 'directive grammar', ->
4545

4646
expect(lines[0][3]).toEqual value: 'NG-REPEAT', scopes: ['text.html.angular', 'meta.tag.block.any.html', 'meta.attribute.html.angular', 'entity.other.attribute-name.html.angular']
4747

48+
it 'tokenizes ng-repeat-start and ng-repeat-end attribute', ->
49+
lines = grammar.tokenizeLines '''
50+
<div ng-repeat-start></div>
51+
<div ng-repeat-end></div>
52+
'''
53+
54+
expect(lines[0][3]).toEqual value: 'ng-repeat-start', scopes: ['text.html.angular', 'meta.tag.block.any.html', 'meta.attribute.html.angular', 'entity.other.attribute-name.html.angular']
55+
expect(lines[1][3]).toEqual value: 'ng-repeat-end', scopes: ['text.html.angular', 'meta.tag.block.any.html', 'meta.attribute.html.angular', 'entity.other.attribute-name.html.angular']
56+
4857
it 'tokenizes ng-controller attribute in body tag', ->
4958
lines = grammar.tokenizeLines '''
5059
<body ng-controller="TestCtrl">

0 commit comments

Comments
 (0)