When I run lint with validate-attribute-seperator on Angular 2 pug template, I get following error. This is because attribute name(in this case *ngIf)'s regex is not escaped properly. I will create PR. Please wait a moment.
+ pug-lint ./src/index.pug ./src/main/app/components/app-header.pug ./src/main/app/components/app.pug ./src/main/auth/components/sign-in.pug
/home/vagrant/works/tento-4/node_modules/pug-lint/lib/rules/validate-attribute-separator.js:124
var regexReplace = new RegExp(patterns.join('|'), 'g');
^
SyntaxError: Invalid regular expression: /*ngIf\s*\!*=\s*'authenticated'|(click)\s*\!*=\s*'signOut\.emit\(\)'|href\s*\!*=\s*''/: Nothing to repeat
at RegExp (native)
at getParsedSource (/home/vagrant/works/tento-4/node_modules/pug-lint/lib/rules/validate-attribute-separator.js:124:26)
at /home/vagrant/works/tento-4/node_modules/pug-lint/lib/rules/validate-attribute-separator.js:102:24
at /home/vagrant/works/tento-4/node_modules/pug-lint/lib/pug-file.js:367:7
at Array.forEach (native)
at Object.iterateTokensByFilter (/home/vagrant/works/tento-4/node_modules/pug-lint/lib/pug-file.js:366:36)
at Object.iterateTokensByType (/home/vagrant/works/tento-4/node_modules/pug-lint/lib/pug-file.js:374:10)
at Object.lint (/home/vagrant/works/tento-4/node_modules/pug-lint/lib/rules/validate-attribute-separator.js:73:10)
at /home/vagrant/works/tento-4/node_modules/pug-lint/lib/linter.js:145:12
at Array.forEach (native)
When I run lint with
validate-attribute-seperator
on Angular 2 pug template, I get following error. This is because attribute name(in this case*ngIf
)'s regex is not escaped properly. I will create PR. Please wait a moment.