Skip to content

Commit

Permalink
fix(rule): template-banana-in-box regex failing in some environments (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelss95 authored and mgechev committed May 1, 2019
1 parent efbcb69 commit 3b82574
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/templateBananaInBoxRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { SourceFile } from 'typescript';
import { NgWalker, NgWalkerConfig } from './angular/ngWalker';
import { BasicTemplateAstVisitor } from './angular/templates/basicTemplateAstVisitor';

const INVALID_BOX = /^\[(?!\()(.*)(?<!\))\]$/;
const INVALID_PATTERN = /\[(.*)\]/;
const VALID_CLOSE_BOX = ')]';
const VALID_OPEN_BOX = '[(';

Expand Down Expand Up @@ -38,7 +38,7 @@ class TemplateVisitorCtrl extends BasicTemplateAstVisitor {
}

private validateEvent(ast: BoundEventAst): void {
const matches = ast.name.match(INVALID_BOX);
const matches = ast.name.match(INVALID_PATTERN);

if (!matches) return;

Expand Down

0 comments on commit 3b82574

Please sign in to comment.