Arbit - project tracking

Dwoo

#33: Extra Indents Added with Foreach and Loops

Issue revisions

  • new by Harrison H at 2009-M-14 23:49
  • closed by Jordi Boggiano at 2011-F-15 0:29
Type bug bug
State closed closed
Priority normal normal
Resolution none none
Assigned to Nobody
Scheduled for
Affected versions
Affected components
Last change Tuesday 15 February 2011 00:29:12 UTC by Jordi Boggiano

It seems that if the opening {foreach} or {loop} tags are indented, the first line that is output by the foreach or loop will have an extra indent added to it. The lines will appear correct if there is no indenting of the beginning {foreach} or {loop} tags.

  • Jordi Boggiano at Monday 12 October 2009 22:41:57 UTC

    This is kinda tricky to achieve in the current state of things, since when the block is parsed the whitespace that precedes is already "long gone", but if I ever think of a solution I'll try to fix this.

  • Jordi Boggiano at Tuesday 15 February 2011 00:29:12 UTC

    The only way I see is to do something like:

    >{ foreach ...}

    instead of

    > {foreach ...}

    That way you suppress the indent. Note that this requires you call "setLooseOpeningHandling(true)" on the Dwoo_Compiler instance.