| @@ -267,19 +267,19 @@ | |||||
| token = tokens[i]; | token = tokens[i]; | ||||
| switch (token[0]) { | switch (token[0]) { | ||||
| case '#': | |||||
| case '^': | |||||
| collector.push(token); | |||||
| sections.push(token); | |||||
| collector = token[4] = []; | |||||
| break; | |||||
| case '/': | |||||
| section = sections.pop(); | |||||
| section[5] = token[2]; | |||||
| collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens; | |||||
| break; | |||||
| default: | |||||
| collector.push(token); | |||||
| case '#': | |||||
| case '^': | |||||
| collector.push(token); | |||||
| sections.push(token); | |||||
| collector = token[4] = []; | |||||
| break; | |||||
| case '/': | |||||
| section = sections.pop(); | |||||
| section[5] = token[2]; | |||||
| collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens; | |||||
| break; | |||||
| default: | |||||
| collector.push(token); | |||||
| } | } | ||||
| } | } | ||||
| @@ -329,16 +329,16 @@ | |||||
| var index = this.tail.search(re), match; | var index = this.tail.search(re), match; | ||||
| switch (index) { | switch (index) { | ||||
| case -1: | |||||
| match = this.tail; | |||||
| this.tail = ''; | |||||
| break; | |||||
| case 0: | |||||
| match = ''; | |||||
| break; | |||||
| default: | |||||
| match = this.tail.substring(0, index); | |||||
| this.tail = this.tail.substring(index); | |||||
| case -1: | |||||
| match = this.tail; | |||||
| this.tail = ''; | |||||
| break; | |||||
| case 0: | |||||
| match = ''; | |||||
| break; | |||||
| default: | |||||
| match = this.tail.substring(0, index); | |||||
| this.tail = this.tail.substring(index); | |||||
| } | } | ||||
| this.pos += match.length; | this.pos += match.length; | ||||