Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
revert embedded tex highlighting
  • Loading branch information
jjallaire committed Apr 25, 2012
1 parent 970335b commit cf03f6d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
8 changes: 1 addition & 7 deletions src/gwt/acesupport/acemode/markdown.js
Expand Up @@ -20,17 +20,11 @@ define("mode/markdown", function(require, exports, module) {

var oop = require("ace/lib/oop");
var TextMode = require("ace/mode/text").Mode;
var TexMode = require("mode/tex").Mode;
var Tokenizer = require("ace/tokenizer").Tokenizer;
var MarkdownHighlightRules = require("mode/markdown_highlight_rules").MarkdownHighlightRules;

var Mode = function() {
var highlighter = new MarkdownHighlightRules();
this.$tokenizer = new Tokenizer(highlighter.getRules());
this.$embeds = highlighter.getEmbeds();
this.createModeDelegates({
"mathjax-": function() { TexMode(false); }
});
this.$tokenizer = new Tokenizer(new MarkdownHighlightRules().getRules());
};
oop.inherits(Mode, TextMode);

Expand Down
27 changes: 14 additions & 13 deletions src/gwt/acesupport/acemode/markdown_highlight_rules.js
Expand Up @@ -19,7 +19,6 @@ define("mode/markdown_highlight_rules", function(require, exports, module) {

var oop = require("ace/lib/oop");
var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightRules;
var TexHighlightRules = require("mode/tex_highlight_rules").TexHighlightRules;

var MarkdownHighlightRules = function() {

Expand Down Expand Up @@ -82,7 +81,7 @@ var MarkdownHighlightRules = function() {
}, { // MathJax $$
token : "support.function",
regex : "\\${2}",
next : "mathjax-start"
next : "mathjax"
}, { // list
token : "markup.list",
regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
Expand Down Expand Up @@ -130,19 +129,21 @@ var MarkdownHighlightRules = function() {
}, {
token : "support.function",
regex : ".+"
} ],

"mathjax" : [ {
token : "support.function",
regex : "[^\\r]+\\${2}",
next : "start"
}, {
token : "support.function",
regex : "\\${2}",
next : "start"
}, {
token : "support.function",
regex : ".+"
} ]
};

this.embedRules(TexHighlightRules, "mathjax-", [{
token : "support.function",
regex : "[^\\r]+\\${2}",
next : "start"
}, {
token : "support.function",
regex : "\\${2}",
next : "start"
}]);

};
oop.inherits(MarkdownHighlightRules, TextHighlightRules);

Expand Down

0 comments on commit cf03f6d

Please sign in to comment.