Sha256: c38a5ee0b4516b1db080a0e25fd16159514835cbc8b29e484595c867faa1b0f9

Contents?: true

Size: 1.03 KB

Versions: 20

Compression:

Stored size: 1.03 KB

Contents

define(function(require, exports, module) {
"use strict";

var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;

var LatexHighlightRules = function() {   
    this.$rules = {
        "start" : [{
            // A tex command e.g. \foo
            token : "keyword",
            regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
        }, {
            // Curly and square braces
            token : "lparen",
            regex : "[[({]"
        }, {
            // Curly and square braces
            token : "rparen",
            regex : "[\\])}]"
        }, {
            // Inline math between two $ symbols
            token : "string",
            regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"
        }, {
            // A comment. Tex comments start with % and go to 
            // the end of the line
            token : "comment",
            regex : "%.*$"
        }]
    };
};

oop.inherits(LatexHighlightRules, TextHighlightRules);

exports.LatexHighlightRules = LatexHighlightRules;

});

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
gollum-3.1.2 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-3.1.1 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-3.1.0 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-3.0.0 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.7.0 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.6.0 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.5.2 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.5.1 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.5.0 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.4.15 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.4.14 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.4.13 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.4.12 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.4.11 lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.4.10 lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.4.9 lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.4.8 lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.4.7 lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.4.6 lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js
gollum-2.4.5 lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js