Replace all occurences of escaped quotes.

This commit is contained in:
Kim Biesbjerg
2017-07-05 15:43:54 +02:00
parent 5259da8fe3
commit b2ae17697d
2 changed files with 7 additions and 1 deletions

View File

@@ -18,7 +18,7 @@ export class PipeParser extends AbstractTemplateParser implements ParserInterfac
const regExp: RegExp = /(['"`])((?:(?!\1).|\\\1)+)\1\s*\|\s*translate/g;
let matches: RegExpExecArray;
while (matches = regExp.exec(template)) {
collection = collection.add(matches[2].replace('\\\'', '\''));
collection = collection.add(matches[2].split('\\\'').join('\''));
}
return collection;