Revert change to line 17

The original is fine, emitter is not needed.
This commit is contained in:
ZC
2021-04-17 10:18:39 +08:00
committed by Jun Yang
parent b41be92dfd
commit 354a971b9e
@@ -12,9 +12,9 @@ engine.registerTag('upper', {
parse: function(tagToken: TagToken, remainTokens: TopLevelToken[]) { parse: function(tagToken: TagToken, remainTokens: TopLevelToken[]) {
this.str = tagToken.args; // name this.str = tagToken.args; // name
}, },
render: async function(ctx: Context, emitter: Emitter) { render: async function(ctx: Context) {
var str = await this.liquid.evalValue(this.str, ctx); // 'alice' var str = await this.liquid.evalValue(this.str, ctx); // 'alice'
emitter.write(`<span>${str.toUpperCase()}</span>`) // 'Alice' return str.toUpperCase() // 'ALICE'
} }
}); });
``` ```