Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions modules/@angular/compiler/src/assertions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ export function assertArrayOfStrings(identifier: string, value: any) {
}

const INTERPOLATION_BLACKLIST_REGEXPS = [
/^\s*$/g, // empty
/[<>]/g, // html tag
/^[\{\}]$/g, // i18n expansion
/^\s*$/, // empty
/[<>]/, // html tag
/^[{}]$/, // i18n expansion
/&(#|[a-z])/i, // character reference
];

export function assertInterpolationSymbols(identifier: string, value: any): void {
Expand Down
14 changes: 14 additions & 0 deletions modules/@angular/compiler/src/chars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,20 @@ export const $PIPE = 124;
export const $TILDA = 126;
export const $AT = 64;

export const $BT = 96;

export function isWhitespace(code: number): boolean {
return (code >= $TAB && code <= $SPACE) || (code == $NBSP);
}

export function isDigit(code: number): boolean {
return $0 <= code && code <= $9;
}

export function isAsciiLetter(code: number): boolean {
return code >= $a && code <= $z || code >= $A && code <= $Z;
}

export function isAsciiHexDigit(code: number): boolean {
return code >= $a && code <= $f || code >= $A && code <= $F || isDigit(code);
}
Loading