3 lines
1.2 KiB
JavaScript
3 lines
1.2 KiB
JavaScript
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
|
(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/multiplex"],a):a(CodeMirror)})(function(a){a.defineMode("htmlembedded",function(c,b){var d=b.closeComment||"--%\x3e";return a.multiplexingMode(a.getMode(c,"htmlmixed"),{open:b.openComment||"\x3c%--",close:d,delimStyle:"comment",mode:{token:function(a){a.skipTo(d)||a.skipToEnd();return"comment"}}},{open:b.open||b.scriptStartRegex||"\x3c%",close:b.close||b.scriptEndRegex||"%\x3e",mode:a.getMode(c,b.scriptingModeSpec)})},"htmlmixed");a.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"});a.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"});a.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"});a.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})}); |