Skip to content

Commit

Permalink
Merge pull request #429 from lblod/hotfix/trim-templates-before-loading
Browse files Browse the repository at this point in the history
Hotfix: trim whitespace out of templates before instantiating them
  • Loading branch information
elpoelma authored Feb 15, 2023
2 parents a263228 + 062ee1f commit 3e68dca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/components/document-creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ export default class DocumentCreatorComponent extends Component {
// regular templates from templatesForContext do not return body of template
await this.template.reload(this.template);
}
return instantiateUuids(this.template.body);
const trimmedHtml = this.template.body.replace(/>\s+</g, '><');
return instantiateUuids(trimmedHtml);
} else return '';
}

Expand Down

0 comments on commit 3e68dca

Please sign in to comment.