fix erb comment highlighting

This commit is contained in:
nightwing 2013-08-28 12:12:22 +04:00
commit 4492925305
3 changed files with 13 additions and 1 deletions

View file

@ -11,6 +11,7 @@
<% @books.each do |book| %>
<tr>
<%# comment %>
<td><%= book.title %></td>
<td><%= book.content %></td>
<td><%= link_to 'Show', book %></td>

View file

@ -96,6 +96,12 @@
["meta.tag.punctuation.begin","<"],
["meta.tag.name.table","tr"],
["meta.tag.punctuation.end",">"]
],[
"start",
["text"," "],
["comment.start.erb","<%#"],
["comment"," comment "],
["comment.end.erb","%>"]
],[
"start",
["text"," "],

View file

@ -45,7 +45,12 @@ define(function(require, exports, module) {
}, {
token : "comment.start.erb",
regex : "<%#",
push : [{regex: "%>", next: "pop"}]
push : [{
token : "comment.end.erb",
regex: "%>",
next: "pop",
defaultToken:"comment"
}]
}, {
token : "support.ruby_tag",
regex : "<%+(?!>)[-=]?",