refactor(compiler): rename INTERPOLATION_BLACKLIST_REGEXPS (#29593)

PR Close #29593
This commit is contained in:
Ben Lesh 2019-03-29 11:04:16 -07:00 committed by Jason Aden
parent 1c07061246
commit 3487055d10
1 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ export function assertArrayOfStrings(identifier: string, value: any) {
}
}
const INTERPOLATION_BLACKLIST_REGEXPS = [
const UNUSABLE_INTERPOLATION_REGEXPS = [
/^\s*$/, // empty
/[<>]/, // html tag
/^[{}]$/, // i18n expansion
@ -34,8 +34,8 @@ export function assertInterpolationSymbols(identifier: string, value: any): void
} else if (value != null) {
const start = value[0] as string;
const end = value[1] as string;
// black list checking
INTERPOLATION_BLACKLIST_REGEXPS.forEach(regexp => {
// Check for unusable interpolation symbols
UNUSABLE_INTERPOLATION_REGEXPS.forEach(regexp => {
if (regexp.test(start) || regexp.test(end)) {
throw new Error(`['${start}', '${end}'] contains unusable interpolation symbol.`);
}