Spacing issue with the {repeat} command

Hello! I'm trying to use my /comment snippet form in Trello and I need help with spacing.

There should not be spacing between bullet pointed items and there should be spacing between the two chunks of links and the text under it to look like this:

I believe it has to do with the if and repeat equation I'm using to repeat a bullet point x times

Any help would be greatly appreciated!

Can you post the relevant snippet portion that creates the repeated list?

@scott hello! thank you so much for helping!
{note} Number of items OUT OF STOCK: {formtext: name=oos; default=0}{endnote:trim=yes}

{if: oos>0}The following item(s) could not be uploaded because they are out of stock:

{repeat: oos}

  • {formparagraph: name=link to oos item}


{note} Number of items UPLOADED TO SHOPPING LIST: {formtext: name=quantity; default=1}{endnote:trim=yes}

{if: quantity>0}All finds uploaded and added to shopping list:

{repeat: quantity}

  • {formtext: name=Find ID}: {formparagraph: name=Find Name}

{endrepeat}{endif: trim=yes}

I'm having a little hard time following the snippet as I can't tell what is part of the snippet and what is the forum software formatting things. (Pro tip: use [snippet]...[/snippet] around your snippet text in the forum to have it formatted nicely like the examples below)

I think the key issue is related to the section that looks like this simplified example:

{repeat: 3}
-- {formtext: name=Find ID}

As in your issue there is an extra space between each newline. That's because we have a newline after the {repeat} and also a newline before the {endrepeat}. So we have two new lines between each item.

To fix this there are two basic approaches. One is to simply get rid of one of the newlines like so:

{repeat: 3}
-- {formtext: name=Find ID}{endrepeat}

Alternatively, if you want to keep the break there for readability purposes, you can you the trim attribute to remove the newline like so:

{repeat: 3}
-- {formtext: name=Find ID}
{endrepeat: trim=left}

trim removes whitespace around a command. Setting it to left means to remove whitespace on the left side of the command.

Note that both these examples could also be optionally rewritten to modify the starting {repeat} rather than the {endrepeat}.

That worked, thanks so much!