fix #2051 highlighting php string in script tag

This commit is contained in:
nightwing 2014-07-16 23:27:20 +04:00
commit 1ad5e66be0

View file

@ -268,11 +268,14 @@ var Tokenizer = function(rules) {
type = rule.token;
if (rule.next) {
if (typeof rule.next == "string")
if (typeof rule.next == "string") {
if (stack.length && stack[0] == currentState && stack[1] == rule.next)
stack.shift();
currentState = rule.next;
else
} else {
currentState = rule.next(currentState, stack);
}
state = this.states[currentState];
if (!state) {
window.console && console.error && console.error(currentState, "doesn't exist");