Skip to content

Commit f1b0a2e

Browse files
committed
Fix: bugs about mustache
1 parent 6b31181 commit f1b0a2e

File tree

4 files changed

+2017
-4
lines changed

4 files changed

+2017
-4
lines changed

src/html/intermediate-tokenizer.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,14 +498,13 @@ export class IntermediateTokenizer {
498498
if (this.expressionStartToken != null) {
499499
return this.processText(token)
500500
}
501+
const separated = (this.currentToken != null && this.currentToken.range[1] !== token.range[0])
502+
const result = separated ? this.commit() : null
501503

502504
this.tokens.push(token)
503505
this.expressionStartToken = token
504506

505-
if (this.currentToken != null && this.currentToken.range[1] !== token.range[0]) {
506-
return this.commit()
507-
}
508-
return null
507+
return result
509508
}
510509

511510
/**

0 commit comments

Comments
 (0)