Sha256: e686da3620e01c9a7fb813adc555736323fc532877867c8ade6b70888a81a013

Contents?: true

Size: 1.68 KB

Versions: 27

Compression:

Stored size: 1.68 KB

Contents

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE

(function(mod) {
  if (typeof exports == "object" && typeof module == "object") // CommonJS
    mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"),
        require("../../addon/mode/multiplex"));
  else if (typeof define == "function" && define.amd) // AMD
    define(["../../lib/codemirror", "../htmlmixed/htmlmixed",
            "../../addon/mode/multiplex"], mod);
  else // Plain browser env
    mod(CodeMirror);
})(function(CodeMirror) {
  "use strict";

  CodeMirror.defineMode("htmlembedded", function(config, parserConfig) {
    var closeComment = parserConfig.closeComment || "--%>"
    return CodeMirror.multiplexingMode(CodeMirror.getMode(config, "htmlmixed"), {
      open: parserConfig.openComment || "<%--",
      close: closeComment,
      delimStyle: "comment",
      mode: {token: function(stream) {
        stream.skipTo(closeComment) || stream.skipToEnd()
        return "comment"
      }}
    }, {
      open: parserConfig.open || parserConfig.scriptStartRegex || "<%",
      close: parserConfig.close || parserConfig.scriptEndRegex || "%>",
      mode: CodeMirror.getMode(config, parserConfig.scriptingModeSpec)
    });
  }, "htmlmixed");

  CodeMirror.defineMIME("application/x-ejs", {name: "htmlembedded", scriptingModeSpec:"javascript"});
  CodeMirror.defineMIME("application/x-aspx", {name: "htmlembedded", scriptingModeSpec:"text/x-csharp"});
  CodeMirror.defineMIME("application/x-jsp", {name: "htmlembedded", scriptingModeSpec:"text/x-java"});
  CodeMirror.defineMIME("application/x-erb", {name: "htmlembedded", scriptingModeSpec:"ruby"});
});

Version data entries

27 entries across 26 versions & 3 rubygems

Version Path
keppler-2.1.22 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.21 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.20 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.19 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.18 testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.18 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.17 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
stisla-rails-0.0.2 vendor/assets/modules/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.16 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.15 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.14 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.13 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.12 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.11 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.10 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.9 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.8 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.7 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.6 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js
keppler-2.1.5 installer/core/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js