From d8183c94d4a10f20d4962ded08b050891875d3a2 Mon Sep 17 00:00:00 2001 From: Alex Rickabaugh Date: Thu, 29 Jul 2021 10:58:22 -0700 Subject: [PATCH] refactor(compiler): remove unnecessary escapes (#42990) This commit is part of a larger scale change to eliminate unnecessary escapes in string literals, in advance of enabling stricter checks in `ts_library` rules in g3. PR Close #42990 --- packages/compiler/src/shadow_css.ts | 2 +- packages/compiler/src/view_compiler/view_compiler.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/compiler/src/shadow_css.ts b/packages/compiler/src/shadow_css.ts index 0cbf8c8b14..cbb2896034 100644 --- a/packages/compiler/src/shadow_css.ts +++ b/packages/compiler/src/shadow_css.ts @@ -624,7 +624,7 @@ const _shadowDOMSelectorsRe = [ // Support for `>>>`, `deep`, `::ng-deep` is then also deprecated and will be removed in the future. // see https://github.com/angular/angular/pull/17677 const _shadowDeepSelectors = /(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g; -const _selectorReSuffix = '([>\\s~+\[.,{:][\\s\\S]*)?$'; +const _selectorReSuffix = '([>\\s~+[.,{:][\\s\\S]*)?$'; const _polyfillHostRe = /-shadowcsshost/gim; const _colonHostRe = /:host/gim; const _colonHostContextRe = /:host-context/gim; diff --git a/packages/compiler/src/view_compiler/view_compiler.ts b/packages/compiler/src/view_compiler/view_compiler.ts index e8c4ef6ba9..4cbe72a4d8 100644 --- a/packages/compiler/src/view_compiler/view_compiler.ts +++ b/packages/compiler/src/view_compiler/view_compiler.ts @@ -24,7 +24,7 @@ import {componentFactoryResolverProviderDef, depDef, lifecycleHookToNodeFlag, pr const CLASS_ATTR = 'class'; const STYLE_ATTR = 'style'; -const IMPLICIT_TEMPLATE_VAR = '\$implicit'; +const IMPLICIT_TEMPLATE_VAR = '$implicit'; export class ViewCompileResult { constructor(public viewClassVar: string, public rendererTypeVar: string) {}