Open 13leaf opened 9 years ago
没太明白,我感觉这个正常啊
通常来说使用者的预期结果可能是:
0,1
newline
1,3
newline
为了写出这种效果,必须要
{{foreach from=$list item='it' key='i'}}{{$i}},{{$it}}
{{endforeach}}
Twig中可以通过设置whitespace_trim或者使用spaceless tag来解决这个问题 http://twig.sensiolabs.org/doc/templates.html
I see. Add the feature in next milestone?
OK
Like this
After Lex,the tokens will like that:
foreachTag
,newLineText
,print $i
,print $it
,newLineText
,endforeachTag
. So the output(with list=[1,3]) should be:newLine
0,1newLine
1,3newLine
That may not be expected.