statamic-var
statamic-var copied to clipboard
Variable modifiers not working with large amount of data
I'm storing a bunch of HTML in a variable, then using {{ var:extract }} to get a word count, but it ends up way off.
{{ var:content_full }}{{ theme:partial src="replicator_default" }}{{ /var:content_full }}
{{ var:extract }}{{ content_full|word_count }}{{ /var:extract }}
This returns 28, but it should be 776.
I also tried using |striptags, but that just outputs the HTML. I tested using both |word_count and |striptags on {{ content }} (after pasting the HTML under the front matter in the file) and both work as expected.
Hey Curtis, are you sure this is a problem with the plugin? Does it work when you try to copy the output of the {{theme:partial}} call directly between {{var}} and {{/var}}?
Hey Michael,
Finally got around to testing this. It outputs the correct number when I use the partial output in place of the partial itself.