Closed Timo-Breumelhof closed 3 years ago
I have also used it like this:
{{#contains @index 1}}
{{/contains}}
I think that's because index = 1 so the comparison is 1 contains 1 and thus the order does not matter
In my opinion, this is a necessary breaking change if all of the other implementations work differently.
Fixed in v4.7
The documentation of this helper https://opencontent.readme.io/docs/tokens shows:
But that did not work the way I expected.
I found out it works like this: {{#contains "string" field}}
See also: https://github.com/sachatrauwaen/OpenContent/blob/a3dadd8cc7414ad622ff6bc3e0f0cd9aed41ae3a/OpenContent/Components/Handlebars/HandlebarsEngine.cs#L1118
IMO that's not logical, but I guess it's a breaking change if we fix it according to the documentation?
@hismightiness @sachatrauwaen