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

Correct highlighting of ng-repeat-start and ng-repeat-end attributes #52

Merged
merged 1 commit into from
Jan 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion grammars/angularjs.cson
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
'non-bindable|' +
'open|options|' +
'paste|pluralize|' +
'readonly|repeat|repeat-start|repeat-end|' +
'readonly|repeat-start|repeat-end|repeat|' +
'selected|show|src|srcset|style|strict-di|submit|switch|switch-when|switch-default|' +
'transclude|' +
'value|' +
Expand Down
9 changes: 9 additions & 0 deletions spec/grammar-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ describe 'directive grammar', ->

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']

it 'tokenizes ng-repeat-start and ng-repeat-end attribute', ->
lines = grammar.tokenizeLines '''
<div ng-repeat-start></div>
<div ng-repeat-end></div>
'''

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']
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']

it 'tokenizes ng-controller attribute in body tag', ->
lines = grammar.tokenizeLines '''
<body ng-controller="TestCtrl">
Expand Down