ruby multi-line comments

This commit is contained in:
Heigh Tech LLC 2011-02-02 15:05:15 +01:00
commit 67836cc281
2 changed files with 9 additions and 1 deletions

View file

@ -79,7 +79,7 @@ oop.inherits(Mode, TextMode);
return -2;
}
else {
return doc.indentRows(startRow, endRow, "//");
return doc.indentRows(startRow, endRow, "#");
}
};

View file

@ -74,6 +74,10 @@ RubyHighlightRules = function() {
token : "comment",
regex : "#.*$"
}, {
token : "comment", // multi line comment
regex : "^\=begin$",
next : "comment"
}, {
token : "string.regexp",
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
}, {
@ -135,6 +139,10 @@ RubyHighlightRules = function() {
],
"comment" : [
{
token : "comment", // closing comment
regex : "^\=end$",
next : "start"
}, {
token : "comment", // comment spanning whole line
regex : ".+"
}