Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make htmlmixed properly check for "tag" style

This allows the xml mode to return a style with space separated classes
and still work. I didn't use /\btag\b/ since that can match "tag-foo".
  • Loading branch information...
commit 5da226e88bca0ed5a202ffd4163555c7fc0bfe2d 1 parent 36c763b
Timothy Hatcher authored marijnh committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  mode/htmlmixed/htmlmixed.js
View
2  mode/htmlmixed/htmlmixed.js
@@ -5,7 +5,7 @@ CodeMirror.defineMode("htmlmixed", function(config) {
function html(stream, state) {
var style = htmlMode.token(stream, state.htmlState);
- if (style == "tag" && stream.current() == ">" && state.htmlState.context) {
+ if (/(?:^|\s)tag(?:\s|$)/.test(style) && stream.current() == ">" && state.htmlState.context) {
if (/^script$/i.test(state.htmlState.context.tagName)) {
state.token = javascript;
state.localState = jsMode.startState(htmlMode.indent(state.htmlState, ""));
Please sign in to comment.
Something went wrong with that request. Please try again.