using scriban with SXA we notice the generated HTML has a lot of white spaces ex :
<div id=”dv1”>
<div id=”dv2”>
This is because in scriban we have if condition before rendering the div with id=de2 , is there a way to format the html ?
It would be helpful if you posted the Scriban snippet you are using. I suspect you need to use
~
operator at the end of yourif
code block as described hereFor example:
outputs
You can use this tool to experiment with formatting.