goodeggs/teacup — pull request #36 by scien (2014-05-25 07:20:03+00:00)
Title: allow for simple text functions like coffeecup did

I've wanted to upgrade from coffeecup to teacup for a while now. Everything looks smooth except this one case where I think the way coffeecup handled it made a lot of sense.

This change would allow for writing templates like this...

```
h1 '.title', ->
'My Title'
```
vs
```
h1 '.title', 'My Title'
```

It's extra typing, but I think it's a huge readability win. It makes it really obvious that 'My Title' is nested within the element. Personally, it feels weird putting content inline with the attributes. I also still prefer `h1 class: 'title'` for clarity, but I imagine myself getting comfortable with h1 '.title' pretty quickly, because that's a big typing saver.

Let me know what you think. All tests pass.