diet-ng icon indicating copy to clipboard operation
diet-ng copied to clipboard

For loops cause issues with display: inline tags

Open Ryhon0 opened this issue 5 years ago • 0 comments

The following code returns this HTML:

- foreach (i; 0..3)
   span #{i}
span A
<span>0</span>
<span>1</span>
<span>2</span><span>A</span>

Which look like this: image

The <span> tag uses the inline display style, inline tags create a space between other tags if there's a new line after them.
This creates two issues:

  • For loops don't create a new line after the last item
  • There's no way (as far as I know) to write for loops that don't create new lines

There should some syntax for loops that would not create new lines and the bug where for loops don't create new lines should be fixed

Ryhon0 avatar Jan 20 '21 16:01 Ryhon0