Forced to piggyback on WPML's twig setup in a wordpress plugin. So stuck with their setup and twig 1.32.0.
Is there some way I can force twig to keep whitespace between variables?
{% set foo = "foo" %}
{% set bar = "bar" %}
<p>{{ foo }} {{ bar }}</p>
Expected output:
foo bar
Acctual output:foobar
I really don't want to use   . I can't change how WPML has setup twig so i need something I can use in my template directly to fix this.
{{ foo }} {{ bar }}
` or what you can also try is: `{{ foo ~ ' ' ~ bar }}` – caramba Jun 17 '21 at 11:52