ruby multi-line comments
This commit is contained in:
parent
25288442f4
commit
67836cc281
2 changed files with 9 additions and 1 deletions
|
|
@ -79,7 +79,7 @@ oop.inherits(Mode, TextMode);
|
|||
return -2;
|
||||
}
|
||||
else {
|
||||
return doc.indentRows(startRow, endRow, "//");
|
||||
return doc.indentRows(startRow, endRow, "#");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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 : ".+"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue