Skip to content

createReportHandlebars

createReportHandlebars(): typeof Handlebars

Defined in: handlebars/createReportHandlebars.ts:31

Create a Handlebars environment for a report, with the helpers every report wants.

Each report gets its own instance rather than sharing one, so registering a partial in one can’t leak into another. What’s shared is the setup: currently the eq helper, which reports use to branch on a value inside a template.

Handlebars auto-escapes {{expression}} (unlike {{{expression}}}), so templates compiled here don’t need a hand-rolled escapeHtml() on interpolated org data.

typeof Handlebars

A fresh Handlebars environment.