creationix / haml-js

Haml ported to server-side Javascript. This is a traditional server-side templating language. Tested with node-js
MIT License
900 stars 109 forks source link

inline locals don't work? #8

Closed aheckmann closed 14 years ago

aheckmann commented 14 years ago

I'm new to using Haml but judging from the examples on the Haml site it seems the following should work:

locals: {
  me: "Aaron"
}

#test1 Hello = me`

The following is what renders: <div id="test1">Hello = me</div>

But shouldn't it render <div id="test1">Hello Aaron</div>

BTW, if I put the = me on a new line then it renders properly but I don't want a line break to be output between Hello and Aaron.

Thanks

creationix commented 14 years ago

The = has to be immediately after the tag descriptor, otherwise everything is considered plain text.

#test= "Hello " + me

is what you're looking for