Skip to content

Commit

Permalink
feat(Handlebars): support recursive partial blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
alandefreitas committed Nov 19, 2024
1 parent 184448a commit 6f5bf3d
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 61 deletions.
5 changes: 3 additions & 2 deletions include/mrdocs/Support/Handlebars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,9 @@ class Handlebars {
std::string
render(std::string_view templateText) const
{
dom::Object const& context = {};
auto exp = try_render(templateText, context, {});
dom::Value emptyContext(dom::Object{});
HandlebarsOptions defaultOptions;
auto exp = try_render(templateText, emptyContext, defaultOptions);
if (!exp)
{
throw exp.error();
Expand Down
Loading

0 comments on commit 6f5bf3d

Please sign in to comment.