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