|
|
|
@ -487,10 +487,10 @@ function read_sequence(parser: Parser, done: () => boolean): TemplateNode[] {
|
|
|
|
data: null
|
|
|
|
data: null
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function flush() {
|
|
|
|
function flush(end: number) {
|
|
|
|
if (current_chunk.raw) {
|
|
|
|
if (current_chunk.raw) {
|
|
|
|
current_chunk.data = decode_character_references(current_chunk.raw);
|
|
|
|
current_chunk.data = decode_character_references(current_chunk.raw);
|
|
|
|
current_chunk.end = parser.index;
|
|
|
|
current_chunk.end = end;
|
|
|
|
chunks.push(current_chunk);
|
|
|
|
chunks.push(current_chunk);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -501,10 +501,10 @@ function read_sequence(parser: Parser, done: () => boolean): TemplateNode[] {
|
|
|
|
const index = parser.index;
|
|
|
|
const index = parser.index;
|
|
|
|
|
|
|
|
|
|
|
|
if (done()) {
|
|
|
|
if (done()) {
|
|
|
|
flush();
|
|
|
|
flush(parser.index);
|
|
|
|
return chunks;
|
|
|
|
return chunks;
|
|
|
|
} else if (parser.eat('{')) {
|
|
|
|
} else if (parser.eat('{')) {
|
|
|
|
flush();
|
|
|
|
flush(parser.index - 1);
|
|
|
|
|
|
|
|
|
|
|
|
parser.allow_whitespace();
|
|
|
|
parser.allow_whitespace();
|
|
|
|
const expression = read_expression(parser);
|
|
|
|
const expression = read_expression(parser);
|
|
|
|
|