Closed kohlschuetter closed 1 year ago
Thanks! @kohlschuetter Could you please take a look at that branch: https://github.com/bkiers/Liqp/pull/269 as I believe that will be the next version. There I have removed all static context where possible and left only those new classes that have been introduced by you last time. The API also changes a lot. Instead of different parse- protect- and render-setting all setting are stored directly in TemplateParser (the same way that provides a single point of default properties). This is a handy and easy approach to creating complex stuff in an easy way. For example the same approach from apache common-csv:
SO we have similar now:
And if that branch is not solving issues that this change intended to fix, we can will think how to apply this on top of that.
I will have free time next week somewhere to take a look closer tho this and that and maybe actually do release.
Great, thanks for the heads-up! I've rebased my changes on top of your branch.
@kohlschuetter
In my latest changes, the Template doesn't own filters and insertions anymore, it's now a final part of TeplateParser. Therefore no need to have an extra exposing method, as one is already in place.
Also, I rolled-back the removal of Template constructors with different species of CharStream. People used to worth with familiar types: String, File, and InputStream.
Rebased and merged there: https://github.com/bkiers/Liqp/pull/279
Thanks!
Expose Filters and Insertions from a TemplateContext, and simplify creating a new child context by adding a newChildContext() helper method.