Bug 1:
Whenever there are no default classes being included on a tag and all the included classes are with conditional values, the template is not rendered according to the expectations.
Reproduction guide:
Run the following template:
$var_1 = 20
div
.foo ? $var_1 == 10
.bar ? $var_1 == 20
Compiled template:
{{$var_1 := 20}}{{$__amber_1 := __amber_eql $var_1 10}}{{$__amber_2 := __amber_eql $var_1 20}}
<div{{if $__amber_1}} class="{{if $__amber_1}}foo{{end}} {{if $__amber_2}}bar{{end}}"{{end}}></div>
Expected result:
Real result:
Bug 2:
Whenever adding attributes to a tag, if the same attribute appears multiple times with different conditions, just the latest one is considered.
Reproduction guide:
Run the following template:
$var_1 = 10
div
[foo="bar"] ? $var_1 == 10
[foo="zaz"] ? $var_1 == 20
Compiled template:
{{$var_1 := 20}}{{$__amber_1 := __amber_eql $var_1 10}}{{$__amber_2 := __amber_eql $var_1 20}}
<div{{if $__amber_2}} foo="zaz"{{end}}></div>
Expected result:
Real result:
Version: Latest
Bug 1:
Whenever there are no default classes being included on a tag and all the included classes are with conditional values, the template is not rendered according to the expectations.
Reproduction guide:
Run the following template:
Compiled template:
Expected result:
Real result:
Bug 2:
Whenever adding attributes to a tag, if the same attribute appears multiple times with different conditions, just the latest one is considered.
Reproduction guide:
Run the following template:
Compiled template:
Expected result:
Real result:
Version: Latest