erb support!
This commit is contained in:
parent
20b6652c5b
commit
13bda087e8
2 changed files with 10 additions and 2 deletions
|
|
@ -41,6 +41,7 @@ var oop = require("pilot/oop");
|
|||
var TextMode = require("ace/mode/text").Mode;
|
||||
var JavaScriptMode = require("ace/mode/javascript").Mode;
|
||||
var CssMode = require("ace/mode/css").Mode;
|
||||
var RubyMode = require("ace/mode/ruby").Mode;
|
||||
var Tokenizer = require("ace/tokenizer").Tokenizer;
|
||||
var HtmlHighlightRules = require("ace/mode/html_highlight_rules").HtmlHighlightRules;
|
||||
|
||||
|
|
@ -49,6 +50,7 @@ var Mode = function() {
|
|||
|
||||
this.$js = new JavaScriptMode();
|
||||
this.$css = new CssMode();
|
||||
this.$ruby = new RubyMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
|
|
@ -91,6 +93,12 @@ oop.inherits(Mode, TextMode);
|
|||
args[0] = split[1];
|
||||
return this.$css[method].apply(this.$css, args);
|
||||
}
|
||||
|
||||
var split = state.split("ruby-");
|
||||
if (!split[0] && split[1]) {
|
||||
args[0] = split[1];
|
||||
return this.$ruby[method].apply(this.$ruby, args);
|
||||
}
|
||||
|
||||
return defaultHandler ? defaultHandler() : undefined;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue