-
-
Notifications
You must be signed in to change notification settings - Fork 238
Custom tag registration doesn't work in Liquid v10 #568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
## [10.3.1](v10.3.0...v10.3.1) (2022-12-12) ### Bug Fixes * support `Context` as `evalValue` parameter, [#568](#568) ([0f4916b](0f4916b))
I didn't realize Performance-wise, it's better to create |
Thanks for the fast response.
I don't have any preference, so if it's more perfomant this suggestion, I'll change it. Can you provide an example for that (or update the example in the documentation)? Somethig like this: engine.registerTag('upper', {
parse: function(tagToken, remainTokens) {
this.val = new Value(tagToken.args);
},
render: async function(ctx) {
const str = this.val.value();
return str.toUpperCase();
}
}); |
🎉 This issue has been resolved in version 10.3.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Updated this tutorial: https://liquidjs.com/tutorials/sync-and-async.html as well. Hope it helps! |
Perfect. Thanks! |
Hi.
In Liquidjs v9 I have the following code to create custom tags:
This code fails in Liquid 10:
Uncaught RenderError: Cannot read properties of undefined (reading 'toUpperCase')
.I found this example in the documentation but it doesn't work either:
The text was updated successfully, but these errors were encountered: