sebastienros / fluid

Fluid is an open-source .NET template engine based on the Liquid template language.
MIT License
1.41k stars 176 forks source link

Added Sum ArrayFilter with 2 different options #618

Closed cpriestland closed 8 months ago

cpriestland commented 9 months ago

Added "Sum" ArrayFilter so that others can use it also.

2 options:

Tests included with Pull Request which check both of these scenario's

We use Fluid quite a lot at TemplateTo and hope you don't mind us putting our link in your UsedBy section, Fluid can be used by our users as well when building out their templates.

cpriestland commented 8 months ago

@hishamco Thanks for approving this, is there an idea of when this could be merged as we require the functionality? Thanks

sebastienros commented 8 months ago

Would you mind adding the same tests as in Shopify Liquid to ensure everything behaves as the specs? https://github.com/Shopify/liquid/blob/f5ed5404b5ba04c7010d4f37ca2928bb6fa925a2/test/integration/standard_filter_test.rb#L952-L1052

cpriestland commented 8 months ago

Thanks for your reply @sebastienros I have added the tests as suggested

hishamco commented 8 months ago

Thanks for your contribution @cpriestland