fix #2051 highlighting php string in script tag
This commit is contained in:
parent
a52b30317b
commit
1ad5e66be0
1 changed files with 6 additions and 3 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue