Fix regex. Add *.js to globPatterns
This commit is contained in:
@@ -18,7 +18,8 @@ export class Extractor {
|
||||
|
||||
public globPatterns: string[] = [
|
||||
'/**/*.html',
|
||||
'/**/*.ts'
|
||||
'/**/*.ts',
|
||||
'/**/*.js'
|
||||
];
|
||||
|
||||
public messages: string[] = [];
|
||||
|
@@ -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"');
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user