-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error using {breakIf} in nested foreach loop #340
Comments
Persists in 3.0.9. As workaround (before fix) you can use outer {foreach [0=>'a',1=>'b'] as $key=>$value} {* added outer foreach *}
<span> {* removed n:foreach *}
{foreach ['a'=>'A','b'=>'B'] as $k=>$v}
{if $k == $value}
{$v}
{breakIf TRUE} {* no close tag anymore *}
{/if}
{/foreach}
</span>
{/foreach} |
dg
added a commit
that referenced
this issue
Nov 8, 2023
dg
added a commit
that referenced
this issue
Nov 9, 2023
dg
added a commit
that referenced
this issue
Nov 9, 2023
dg
added a commit
that referenced
this issue
Nov 9, 2023
dg
added a commit
that referenced
this issue
Nov 11, 2023
dg
added a commit
that referenced
this issue
Nov 11, 2023
dg
added a commit
that referenced
this issue
Nov 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version: 3.0.6
Bug Description:
If {breakIf} is used, additional
</span>
is inserted into HTML codeSteps To Reproduce - paste this code to https://fiddle.nette.org/latte:
<span n:foreach="[0=>'a',1=>'b'] as $key=>$value">
{foreach ['a'=>'A','b'=>'B'] as $k=>$v}
{if $k == $value}
{$v}
{breakIf TRUE} {* chybu nadbytecneho </span> zpusobuje tento radek *}
{/if}
{/foreach}
</span>
The text was updated successfully, but these errors were encountered: