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

Support highlighting inside script[type=ng-template] #51

Merged
merged 1 commit into from
Jan 16, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions grammars/angularjs.cson
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,38 @@
{ 'include': '#tag-stuff' }
]
}
{
'begin': '(?:^\\s+)?(<)((?i:script))\\b(?=[^>]*\\btype\\s*=\\s*[\'"]?text/ng-template[\'"]?)(?![^>]*/>)'
'beginCaptures':
'1':
'name': 'punctuation.definition.tag.html'
'2':
'name': 'entity.name.tag.script.html'
'end': '(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?'
'endCaptures':
'2':
'name': 'punctuation.definition.tag.html'
'contentName': 'text.embedded.html'
'patterns': [
{
'include': '#tag-stuff'
}
{
'begin': '(?<!</(?:script|SCRIPT))(>)'
'captures':
'1':
'name': 'punctuation.definition.tag.html'
'2':
'name': 'entity.name.tag.script.html'
'end': '(</)((?i:script))'
'patterns': [
{
'include': 'text.html.angular'
}
]
}
]
}
{ 'include': '#angular-expressions' }
{ 'include': 'text.html.basic' }
]
Expand Down