You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to access the built-in liquidjs filters from a liquidjs class/instance?
I'm using eleventy, and wanted to try sharing filters between liquidjs and nunjucks.
I tried the following, but didn't see any references to filters and am not sure I understand where the filters are stored internally, or if they're private:
Filters are registered to the impl static property of the Filter class(in src/template/filter/filter.ts), which is referenced as a closure variable by Liquid. Thus you cannot get the set of filters by Liquid class or instance, currently.
Thanks to this issue I find out that during every Liquid construction builtin tags/filters are re-registered, and every liquid instance always has the same set of tags/filters despite of the fact that .registerFilter() and .registerTag() are instance methods.
Definitely we should make the set of filters and tags properties of Liquid, are you interested to make a PR? I can help for the test cases.
Is there a way to access the built-in liquidjs filters from a liquidjs class/instance?
I'm using eleventy, and wanted to try sharing filters between liquidjs and nunjucks.
I tried the following, but didn't see any references to filters and am not sure I understand where the filters are stored internally, or if they're private:
The text was updated successfully, but these errors were encountered: