Skip to content

Commit 3b82574

Browse files
rafaelss95mgechev
authored andcommitted
fix(rule): template-banana-in-box regex failing in some environments (#820)
1 parent efbcb69 commit 3b82574

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/templateBananaInBoxRule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { SourceFile } from 'typescript';
55
import { NgWalker, NgWalkerConfig } from './angular/ngWalker';
66
import { BasicTemplateAstVisitor } from './angular/templates/basicTemplateAstVisitor';
77

8-
const INVALID_BOX = /^\[(?!\()(.*)(?<!\))\]$/;
8+
const INVALID_PATTERN = /\[(.*)\]/;
99
const VALID_CLOSE_BOX = ')]';
1010
const VALID_OPEN_BOX = '[(';
1111

@@ -38,7 +38,7 @@ class TemplateVisitorCtrl extends BasicTemplateAstVisitor {
3838
}
3939

4040
private validateEvent(ast: BoundEventAst): void {
41-
const matches = ast.name.match(INVALID_BOX);
41+
const matches = ast.name.match(INVALID_PATTERN);
4242

4343
if (!matches) return;
4444

0 commit comments

Comments
 (0)