Fix template regex to match translate pipe usage in input properties

This commit is contained in:
Kim Biesbjerg
2016-12-03 15:20:56 +01:00
parent b5e1125efb
commit 25760bab5b

View File

@@ -3,8 +3,8 @@ import { ParserInterface } from './parser.interface';
export class HtmlParser implements ParserInterface { export class HtmlParser implements ParserInterface {
public patterns = { public patterns = {
PipeSingleQuote: '{{\\s*\'((?:\\\\.|[^\'\\\\])*)\'\\s*\\|\\s*translate(:.*?)?\\s*}}', PipeSingleQuote: '\'((?:\\\\.|[^\'\\\\])*)\'\\s*\\|\\s*translate(:.*?)?',
PipeDoubleQuote: '{{\\s*"((?:\\\\.|[^"\\\\])*)"\\s*\\|\\s*translate(:.*?)?\\s*}}' PipeDoubleQuote: '"((?:\\\\.|[^"\\\\])*)"\\s*\\|\\s*translate(:.*?)?'
} }
public process(contents: string): string[] { public process(contents: string): string[] {