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

Commit 92304d9

Browse files
committed
fix to syntax highlight for ng-options
close #20
1 parent 7b939db commit 92304d9

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

grammars/angularjs.cson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
list|
120120
messages|message|model|model-options|mousedown|mouseenter|mouseleave|mousemove|mouseover|mouseup|
121121
non-bindable|
122-
open|
122+
open|options|
123123
paste|pluralize|
124124
readonly|repeat|repeat-start|repeat-end|
125125
selected|show|src|srcset|style|strict-di|submit|switch|switch-when|switch-default|

spec/grammar-spec.coffee

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ describe 'directive grammar', ->
5252

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

55+
it 'tokenizes ng-s attribute', ->
56+
lines = grammar.tokenizeLines '''
57+
<select ng-options="color.name group by color.shade for color in colors">
58+
'''
59+
60+
expect(lines[0][3]).toEqual value: 'ng-options', scopes: ['text.html.angular', 'meta.tag.inline.any.html', 'meta.attribute.html.angular', 'entity.other.attribute-name.html.angular']
61+
5562
describe 'directive element', ->
5663
it 'tokenizes ng-include element inside HTML', ->
5764
lines = grammar.tokenizeLines '''

0 commit comments

Comments
 (0)