vendor/assets/javascripts/codemirror/modes/stex.js in codemirror-rails-3.24 vs vendor/assets/javascripts/codemirror/modes/stex.js in codemirror-rails-4.0

- old
+ new

@@ -1,10 +1,20 @@ /* * Author: Constantin Jucovschi (c.jucovschi@jacobs-university.de) * Licence: MIT */ +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + CodeMirror.defineMode("stex", function() { "use strict"; function pushCommand(state, command) { state.cmdState.push(command); @@ -242,5 +252,7 @@ }; }); CodeMirror.defineMIME("text/x-stex", "stex"); CodeMirror.defineMIME("text/x-latex", "stex"); + +});