Sha256: db6fdb90d9edce29f745b72fe46ab45a48734a9e54ac43144ba6c5929e91ee2e

Contents?: true

Size: 1.57 KB

Versions: 23

Compression:

Stored size: 1.57 KB

Contents

CodeMirror.defineMode("htmlmixed",function(t){function e(t,e){var a=r.token(t,e.htmlState);return"tag"==a&&">"==t.current()&&e.htmlState.context&&(/^script$/i.test(e.htmlState.context.tagName)?(e.token=n,e.localState=l.startState(r.indent(e.htmlState,""))):/^style$/i.test(e.htmlState.context.tagName)&&(e.token=o,e.localState=c.startState(r.indent(e.htmlState,"")))),a}function a(t,e,a){var n,o=t.current(),r=o.search(e);return r>-1?t.backUp(o.length-r):(n=o.match(/<\/?$/))&&(t.backUp(o[0].length),t.match(e,!1)||t.match(o[0])),a}function n(t,n){return t.match(/^<\/\s*script\s*>/i,!1)?(n.token=e,n.localState=null,e(t,n)):a(t,/<\/\s*script\s*>/,l.token(t,n.localState))}function o(t,n){return t.match(/^<\/\s*style\s*>/i,!1)?(n.token=e,n.localState=null,e(t,n)):a(t,/<\/\s*style\s*>/,c.token(t,n.localState))}var r=CodeMirror.getMode(t,{name:"xml",htmlMode:!0}),l=CodeMirror.getMode(t,"javascript"),c=CodeMirror.getMode(t,"css");return{startState:function(){var t=r.startState();return{token:e,localState:null,mode:"html",htmlState:t}},copyState:function(t){if(t.localState)var e=CodeMirror.copyState(t.token==o?c:l,t.localState);return{token:t.token,localState:e,mode:t.mode,htmlState:CodeMirror.copyState(r,t.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(t,a){return t.token==e||/^\s*<\//.test(a)?r.indent(t.htmlState,a):t.token==n?l.indent(t.localState,a):c.indent(t.localState,a)},electricChars:"/{}:",innerMode:function(t){var a=t.token==e?r:t.token==n?l:c;return{state:t.localState||t.htmlState,mode:a}}}},"xml","javascript","css"),CodeMirror.defineMIME("text/html","htmlmixed");

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rearview-1.2.3-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.2.2.rc.2-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.2.2.rc.1-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.2.1-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.2.0-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.1.2-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.1.1-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.1.0-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.0.3.rc.4-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.0.3.rc.3-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.0.3.rc.2-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.0.3.rc.1-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.0.2-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.0.2.rc.4-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.0.2.rc.3-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.0.2.rc.2-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.0.2.rc.1-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.0.1-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.0.0-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js
rearview-1.0.0.rc5-jruby public/rearview/vendor/codemirror/mode/htmlmixed/htmlmixed.js