Will Spacebars merge variables into commented out section? Or will it ignore it?
<!--<script type="application/json+trustpilot">
{
"recipientName": "{{ customerFullName }}",
"recipientEmail": "{{ customerEmail }}",
"referenceId": "{{ shippingOrder._id }}"
}
</script>-->
<p>Hola {{ customer.profile.firstName }},</p>
Not sure, I assume it will.
Should be very easy to test however?
ah I found it
Comment tags also come in a “block comment” form. Block comments may contain {{ and }}:
{{!-- This is a block comment.
We can write {{foo}} and it doesn't matter.
{{#with x}}This code is commented out.{{/with}}
--}}
actually that doesn’t work. the comments are removed during compilation.
1 Like
just built the whole string from a function and returned it within triple braces…