Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Html Slim attributes without values

Tags:

html

slim-lang

There is the following SLIM code:

input international-phone-number="international-phone-number" type="text"

It code generates the HTML code:

<input international-phone-number="international-phone-number" type="text></input>

But I need to get <input international-phone-number type="text></input>

How can I do it? Thanks!

like image 921
malcoauri Avatar asked Sep 29 '22 00:09

malcoauri


1 Answers

There have been multiple issue reports on GitHub on this, and they have implemented support for valueless attributes (not sure if it's still in the temple version, if it is you'll have to use this). You'll need to do the following:

input(international-phone-number type="text")

Make sure you also set the :format to :html like this:

slimrb --option format=:html
like image 72
Emil Avatar answered Nov 15 '22 10:11

Emil