arnaud-lb / MtHaml

Multi target HAML (HAML for PHP, Twig, <your language here>)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Attributes with dash throw a syntax error

Foxhoundn opened this issue · comments

The following code in .haml.blade.php

%a{ data: { href: route('test') } }

throws the error

syntax error, unexpected '{'

This is what it tries to render

<a <?php echo MtHaml\Runtime::renderAttributes(array(array('class', 'button'), array('data', ({ href: route('review') }))), 'html5', 'UTF-8'); ?>>

What is the correct way to render attributes with dash?