How do you normalize your shortcode code

The shortcodes html :

<div>
{{ range $index, $value :=  .Inner }}
    <div>{{ $value }}</div>
{{ end }}
</div>

The final HTML result when I use range :

<div style="display: flex;flex-direction: column;">
                            
<div></div>

<div></div>

<div></div>

<div></div>

</div>

But I want :

<div style="display: flex;flex-direction: column;">  
<div></div>
<div></div>
<div></div>
<div></div>
</div>

How do I remove these extra newlines

Try {{- ..... -}}

2 Likes

Hi,

Out of curiosity can you tell us what you are trying to achieve with this?

You are using range on .Inner which unless I am mistaken is a string…

Thank you very much for your answer