hamlphp / HamlPHP

Yet another Haml to HTML converter written in PHP.
http://hamlphp.github.com/HamlPHP
MIT License
84 stars 15 forks source link

self-closing tags? #9

Closed billortell closed 13 years ago

billortell commented 13 years ago

:) nuff said?

I keep getting the proverbial

< input name="name" type="type" value="value"></ input>

suggestions?

sniemela commented 13 years ago

Try to add a slash explicitly after the element definition, for instance:

%input{value => 'value'}/

There is no way to automatically close known self-closing tags(br, link...) at the moment, but the feature is on the backlog.

billortell commented 13 years ago

i'll try that again, but i'm pretty sure that didn't work.

complex64 commented 12 years ago

I vote to reopen the Issue, because as of this writing (67bd43bbf7) adding a backslash does not produce a self-closing tag.

Example:

%img{src => $image}/

Renders to:

<img  src="..."></img>

Instead of the expected:

<img src="..." />

Unnecessary white-space is another issue.

sniemela commented 12 years ago

ok, this is fixed in b81593d3febb2b1001a34c609f8f88d73fbb2958