feat(compiler): make interpolation symbols configurable (@Component
config) (#9367)
closes #9158
This commit is contained in:
@ -367,3 +367,7 @@ bool hasConstructor(Object value, Type type) {
|
||||
String escape(String s) {
|
||||
return Uri.encodeComponent(s);
|
||||
}
|
||||
|
||||
String escapeRegExp(String s) {
|
||||
return s.replaceAllMapped(new RegExp(r'([.*+?^=!:${}()|[\]\/\\])'), (Match m) => '\\${m[1]}');
|
||||
}
|
||||
|
@ -466,3 +466,7 @@ export function hasConstructor(value: Object, type: Type): boolean {
|
||||
export function escape(s: string): string {
|
||||
return _global.encodeURI(s);
|
||||
}
|
||||
|
||||
export function escapeRegExp(s: string): string {
|
||||
return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
|
||||
}
|
||||
|
Reference in New Issue
Block a user