Skip to content

Commit

Permalink
Fixes #2571
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Dec 6, 2022
1 parent a40c631 commit 0f44f75
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Plugins/Edge/LiquidEdge.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,19 @@ function rawContentLiquidTag(liquidEngine, renderFn, tagName) {

stream.start();
},
render: async function (ctx) {
render: function* (ctx, emitter) {
let normalizedContext = {};
if (ctx) {
normalizedContext.page = ctx.get(["page"]);
normalizedContext.eleventy = ctx.get(["eleventy"]);
}

let argArray = this.args.map((token) => evalToken(token, ctx));
let argArray = [];
for (let arg of this.args) {
let b = yield evalToken(arg, ctx);
argArray.push(b);
}

let body = this.tokens.map((token) => token.getText()).join("");

return renderFn.call(normalizedContext, tagName, body, ...argArray);
Expand Down

0 comments on commit 0f44f75

Please sign in to comment.