fix(compiler): do not lex }}
when interpolation is disabled (#13531)
* doc(compiler): fix the ICU expander API docs * test(compiler): add lexer and parser specs * fix(compiler): do not lex `}}` when interpolation is disabled fix #13525
This commit is contained in:

committed by
Chuck Jazdzewski

parent
a23fa94ca8
commit
e78508507d
@ -30,9 +30,9 @@ const PLURAL_CASES: string[] = ['zero', 'one', 'two', 'few', 'many', 'other'];
|
||||
*
|
||||
* ```
|
||||
* <ng-container [ngPlural]="messages.length">
|
||||
* <template ngPluralCase="=0">zero</ng-container>
|
||||
* <template ngPluralCase="=1">one</ng-container>
|
||||
* <template ngPluralCase="other">more than one</ng-container>
|
||||
* <template ngPluralCase="=0">zero</template>
|
||||
* <template ngPluralCase="=1">one</template>
|
||||
* <template ngPluralCase="other">more than one</template>
|
||||
* </ng-container>
|
||||
* ```
|
||||
*/
|
||||
|
@ -133,7 +133,7 @@ class _Tokenizer {
|
||||
} else {
|
||||
this._consumeTagOpen(start);
|
||||
}
|
||||
} else if (!this._tokenizeIcu || !this._tokenizeExpansionForm()) {
|
||||
} else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {
|
||||
this._consumeText();
|
||||
}
|
||||
} catch (e) {
|
||||
@ -586,8 +586,8 @@ class _Tokenizer {
|
||||
parts.push(this._interpolationConfig.start);
|
||||
this._inInterpolation = true;
|
||||
} else if (
|
||||
this._interpolationConfig && this._attemptStr(this._interpolationConfig.end) &&
|
||||
this._inInterpolation) {
|
||||
this._interpolationConfig && this._inInterpolation &&
|
||||
this._attemptStr(this._interpolationConfig.end)) {
|
||||
parts.push(this._interpolationConfig.end);
|
||||
this._inInterpolation = false;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user