Grab html instead of text when parsing directive

This commit is contained in:
Kim Biesbjerg 2016-12-07 16:03:46 +01:00
parent e56ce36d9d
commit e26d522604

View File

@ -22,7 +22,7 @@ export class DirectiveParser extends AbstractTemplateParser implements ParserInt
.each((i: number, element: CheerioElement) => { .each((i: number, element: CheerioElement) => {
const $element = $(element); const $element = $(element);
const attr = $element.attr('translate'); const attr = $element.attr('translate');
const text = $element.text().trim(); const text = $element.html().trim();
if (attr) { if (attr) {
results.push(attr); results.push(attr);