mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-24 12:41:06 +00:00
5758c370ea
Partials with returns values are parsed, then inserted into a partial return wrapper via wrapInPartialReturnWrapper in order to assign the return value via *contextWrapper.Set. The predefined wrapper template for partials inserts a partial's nodes into a "with" template action in order to set dot to a *contextWrapper within the partial. However, because "with" is skipped if its argument is falsy, partials with falsy arguments were not being evaluated. This replaces the "with" action in the partial wrapper with a "range" action that isn't skipped if .Arg is falsy. Fixes #7528 |
||
---|---|---|
.. | ||
init.go | ||
init_test.go | ||
partials.go | ||
partials_test.go |