Fix regex. Add *.js to globPatterns

This commit is contained in:
Kim Biesbjerg 2016-12-07 12:38:16 +01:00
parent 2e38258cd9
commit e6b03f8582
3 changed files with 4 additions and 2 deletions

View File

@ -18,7 +18,8 @@ export class Extractor {
public globPatterns: string[] = [
'/**/*.html',
'/**/*.ts'
'/**/*.ts',
'/**/*.js'
];
public messages: string[] = [];

View File

@ -26,7 +26,7 @@ export abstract class AbstractTemplateParser {
* This method replaces `[attr]="'val'""` with `attr="val"`
*/
protected _normalizeTemplateAttributes(template: string): string {
return template.replace(/\[([^\]]+)\]="'([^\"]*)'"/g, '$1="$2"');
return template.replace(/\[([^\]]+)\]="'([^']*)'"/g, '$1="$2"');
}
}

View File

@ -1,5 +1,6 @@
import { ParserInterface } from './parser.interface';
import { AbstractTemplateParser } from './abstract-template.parser';
import * as $ from 'cheerio';
export class DirectiveParser extends AbstractTemplateParser implements ParserInterface {