vendor/assets/javascripts/codemirror/modes/gherkin.js in codemirror-rails-3.24 vs vendor/assets/javascripts/codemirror/modes/gherkin.js in codemirror-rails-4.0
- old
+ new
@@ -11,10 +11,20 @@
//var regex = {
// keywords: /(Feature| {2}(Scenario|In order to|As|I)| {4}(Given|When|Then|And))/
//};
+(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("gherkin", function () {
return {
startState: function () {
return {
lineNumber: 0,
@@ -159,5 +169,7 @@
}
};
});
CodeMirror.defineMIME("text/x-feature", "gherkin");
+
+});