Skip to content

Commit

Permalink
feat: allow usage of async/await in custom JS templates
Browse files Browse the repository at this point in the history
  • Loading branch information
dsarman committed Sep 16, 2023
1 parent 1abfeef commit 0a860b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/template.ts
Expand Up @@ -165,7 +165,7 @@ export class Template implements ITemplate {
page: context.block.page,
level: lvl,
})
return renderrer.renderString(b.content, renderContext)
return renderrer.renderStringAsync(b.content, renderContext)
})
}
getArgProperties() {
Expand Down Expand Up @@ -209,7 +209,7 @@ export class InlineTemplate implements ITemplate {
const renderrer = RenderingSyntax.latest()
const body = '`` ' + this.body + ' ``'
return {
content: renderrer.renderString(body, renderContext),
content: await renderrer.renderStringAsync(body, renderContext),
children: [],
}
}
Expand Down

0 comments on commit 0a860b7

Please sign in to comment.