(stream, state)
| 4 | var cssMode = CodeMirror.getMode(config, "css"); |
| 5 | |
| 6 | function html(stream, state) { |
| 7 | var style = htmlMode.token(stream, state.htmlState); |
| 8 | if (style == "tag" && stream.current() == ">" && state.htmlState.context) { |
| 9 | if (/^script$/i.test(state.htmlState.context.tagName)) { |
| 10 | state.token = javascript; |
| 11 | state.localState = jsMode.startState(htmlMode.indent(state.htmlState, "")); |
| 12 | state.mode = "javascript"; |
| 13 | } |
| 14 | else if (/^style$/i.test(state.htmlState.context.tagName)) { |
| 15 | state.token = css; |
| 16 | state.localState = cssMode.startState(htmlMode.indent(state.htmlState, "")); |
| 17 | state.mode = "css"; |
| 18 | } |
| 19 | } |
| 20 | return style; |
| 21 | } |
| 22 | function maybeBackup(stream, pat, style) { |
| 23 | var cur = stream.current(); |
| 24 | var close = cur.search(pat); |
no outgoing calls
no test coverage detected