From e32370cae8abe3c22e0453e97625eea61b478ee3 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Mon, 21 Mar 2011 10:44:16 +0000 Subject: [PATCH] dom't merge embedded ruby into the standard html mode --- lib/ace/mode/html.js | 8 ------- lib/ace/mode/html_highlight_rules.js | 31 ---------------------------- 2 files changed, 39 deletions(-) diff --git a/lib/ace/mode/html.js b/lib/ace/mode/html.js index 31c645e5..1cc894d9 100644 --- a/lib/ace/mode/html.js +++ b/lib/ace/mode/html.js @@ -41,7 +41,6 @@ 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; @@ -50,7 +49,6 @@ var Mode = function() { this.$js = new JavaScriptMode(); this.$css = new CssMode(); - this.$ruby = new RubyMode(); }; oop.inherits(Mode, TextMode); @@ -94,12 +92,6 @@ oop.inherits(Mode, TextMode); 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; }; diff --git a/lib/ace/mode/html_highlight_rules.js b/lib/ace/mode/html_highlight_rules.js index 6fe97112..26ab064e 100644 --- a/lib/ace/mode/html_highlight_rules.js +++ b/lib/ace/mode/html_highlight_rules.js @@ -40,7 +40,6 @@ define(function(require, exports, module) { var oop = require("pilot/oop"); var CssHighlightRules = require("ace/mode/css_highlight_rules").CssHighlightRules; var JavaScriptHighlightRules = require("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules; -var RubyHighlightRules = require("ace/mode/ruby_highlight_rules").RubyHighlightRules; var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightRules; var HtmlHighlightRules = function() { @@ -68,10 +67,6 @@ var HtmlHighlightRules = function() { token : "text", regex : "<(?=\s*style)", next : "css" - }, { - token : "text", - regex : "<(?=\s*%)", - next : "ruby" }, { token : "text", // opening tag regex : "<\\/?", @@ -120,24 +115,6 @@ var HtmlHighlightRules = function() { regex : "'.*?'" } ], - ruby : [ { - token : "text", - regex : ".", - next : "ruby-start" - }, { - token : "keyword", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "text", - regex : "\\s+" - }, { - token : "string", - regex : '".*?"' - }, { - token : "string", - regex : "'.*?'" - } ], - tag : [ { token : "text", regex : ">", @@ -197,14 +174,6 @@ var HtmlHighlightRules = function() { regex: "<\\/(?=style)", next: "tag" }); - - var rubyRules = new RubyHighlightRules().getRules(); - this.addRules(rubyRules, "ruby-"); - this.$rules["ruby-start"].unshift({ - token: "text", - regex: "%>", - next: "tag" - }); }; oop.inherits(HtmlHighlightRules, TextHighlightRules);