nette/latte

Class names in n:class starting with a hyphen are compiled incorrectly

Closed this issue · 1 comments

Version: 3.0.18

Bug Description

n:class="$foo ? 'font-bold', -top-0.5" is incorrectly compiled to [$foo ? 'font-bold' : null, -'top-0.5'].
The problem is if the class name starts with a hyphen.

The error it produces is Unsupported operand types: string * int

Expected behavior

n:class="$foo ? 'font-bold', -top-0.5" is compiled to [$foo ? 'font-bold' : null, '-top-0.5']