docs/assets/javascript.js
function inTag(stream, state) {
    var ch = stream.next();
    if (ch == ">" || (ch == "/" && stream.eat(">"))) {
      state.jsxTag.depth -= 1;
      state.tokenize = tokenBase;
      return ret(ch == ">" ? "endTag" : "selfcloseTag", "tag bracket");
    } else if (ch == "=") {
      type = "equals";
      return null;
    } else if (ch == "<") {
      state.tokenize = tokenBase;
      var next = state.tokenize(stream, state);
      return next ? next + " tag error" : "tag error";
    } else if (ch == "{") {
      state.jsxTag.brackets[state.jsxTag.depth] = 1; // counter for brackets
      state.tokenize = tokenBase;
      return null;
    } else if (ch == "}") {
      return null;
    } else if (/[\'\"]/.test(ch)) {
      state.tokenize = inAttribute(ch);
      return state.tokenize(stream, state);
    } else {
      stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);
      return "word";
    }
  }
function inTag(stream, state) {
    var ch = stream.next();
    if (ch == ">" || (ch == "/" && stream.eat(">"))) {
      state.jsxTag.depth -= 1;
      state.tokenize = tokenBase;
      return ret(ch == ">" ? "endTag" : "selfcloseTag", "tag bracket");
    } else if (ch == "=") {
      type = "equals";
      return null;
    } else if (ch == "<") {
      state.tokenize = tokenBase;
      var next = state.tokenize(stream, state);
      return next ? next + " tag error" : "tag error";
    } else if (ch == "{") {
      state.jsxTag.brackets[state.jsxTag.depth] = 1; // counter for brackets
      state.tokenize = tokenBase;
      return null;
    } else if (ch == "}") {
      return null;
    } else if (/[\'\"]/.test(ch)) {
      state.tokenize = inAttribute(ch);
      return state.tokenize(stream, state);
    } else {
      stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);
      return "word";
    }
  }
function inTag ( stream , state ) { var ch = stream . next ( ) ; if ( ch == ">" || ( ch == "/" && stream . eat ( ">" ) ) ) { state . jsxTag . depth -= 1 ; state . tokenize = tokenBase ; return ret ( ch == ">" ? "endTag" : "selfcloseTag" , "tag bracket" ) ; } else if ( ch == "=" ) { type = "equals" ; return null ; } else if ( ch == "<" ) { state . tokenize = tokenBase ; var next = state . tokenize ( stream , state ) ; return next ? next + " tag error" : "tag error" ; } else if ( ch == "{" ) { state . jsxTag . brackets [ state . jsxTag . depth ] = 1 ; // counter for brackets state . tokenize = tokenBase ; return null ; } else if ( ch == "}" ) { return null ; } else if ( / [\'\"] / . test ( ch ) ) { state . tokenize = inAttribute ( ch ) ; return state . tokenize ( stream , state ) ; } else { stream . match ( / ^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/] / ) ; return "word" ; } }
for JSX mode
for JSX mode