Question: using filters in tag parameters
Closed this issue · 1 comments
mohas commented
Hi, I'm going to use this fiddle to demonstrate my point, so we have a custom tag and we want parameters to be manipulated using filters when we call hash.render(ctx), do you have any suggestions? and also why does enclosing my parameters value in {{}} or {} always yields true?
currently I parse the parameter {{max|minus:2}}
as string and refeed it to engine engine.parseAndRenderSync(this.args.to, scope)
to apply the filter, but any suggestions are welcome thank you
harttle commented
Nesting {{}}
with {%%}
is invalid in Liquid, though I'm not sure what'll happen. You'll need _evalValue()
to evaluate a filtered value. Like:
const toValue = yield this.liquid._evalValue(to, context)
See this one: https://jsfiddle.net/ok6vqyp8/