code: function tokenString(stream, state) {
      var current, prev, found_var = false;
      while (!stream.eol() && (current = stream.next()) != state.pending) {
        if (current === '$' && prev != '\\' && state.pending == '"') {
          found_var = true;
          break;
        }
        prev = current;
      }
      if (found_var) {
        stream.backUp(1);
      }
      if (current == state.pending) {
        state.continueString = false;
      } else {
        state.continueString = true;
      }
      return "string";
    }
docs: After finding a start of a string ('|") this function attempts to find the end; If a variable is encountered along the way, we display it differently when it is encapsulated in a double-quoted string.