public/javascripts/erp_app/codemirror/mode/htmlmixed/htmlmixed.js in erp_app-3.0.7 vs public/javascripts/erp_app/codemirror/mode/htmlmixed/htmlmixed.js in erp_app-3.0.8

- old
+ new

@@ -26,11 +26,11 @@ return style; } function javascript(stream, state) { if (stream.match(/^<\/\s*script\s*>/i, false)) { state.token = html; - state.curState = null; + state.localState = null; state.mode = "html"; return html(stream, state); } return maybeBackup(stream, /<\/\s*script\s*>/, jsMode.token(stream, state.localState)); @@ -70,10 +70,16 @@ return jsMode.indent(state.localState, textAfter); else return cssMode.indent(state.localState, textAfter); }, + compareStates: function(a, b) { + if (a.mode != b.mode) return false; + if (a.localState) return CodeMirror.Pass; + return htmlMode.compareStates(a.htmlState, b.htmlState); + }, + electricChars: "/{}:" } -}); +}, "xml", "javascript", "css"); CodeMirror.defineMIME("text/html", "htmlmixed");