haml_tag "div#post.large" instead haml_tag :div, :id => 'post', :class => 'large'

5 views
Skip to first unread message

seb

unread,
Dec 9, 2009, 9:53:07 AM12/9/09
to Haml
I use haml_tag quite often, and compared to HAML templates it's
annoying to write:

haml_tag :div, :id => 'post', :class => 'large'

instead of the much simpler

haml_tag "div#post.large"

Does anyone have any suggestions on how to implement this. I'm sure
parsing "div#post.large" is already implemented somewhere, but where?

Nathan Weizenbaum

unread,
Dec 9, 2009, 5:16:50 PM12/9/09
to ha...@googlegroups.com
This is an interesting idea. The code probably couldn't be re-used from the engine - that's too wrapped up in parsing the attributes and so forth as well - but if someone wanted to write a patch to add it in, I'd accept it.


--

You received this message because you are subscribed to the Google Groups "Haml" group.
To post to this group, send email to ha...@googlegroups.com.
To unsubscribe from this group, send email to haml+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.



seb

unread,
Dec 10, 2009, 4:43:54 AM12/10/09
to Haml
Cool. I'll write a patch.

On Dec 9, 11:16 pm, Nathan Weizenbaum <nex...@gmail.com> wrote:
> This is an interesting idea. The code probably couldn't be re-used from the
> engine - that's too wrapped up in parsing the attributes and so forth as
> well - but if someone wanted to write a patch to add it in, I'd accept it.
>
> On Wed, Dec 9, 2009 at 6:53 AM, seb <sebi.burkh...@gmail.com> wrote:
> > I use haml_tag quite often, and compared to HAML templates it's
> > annoying to write:
>
> > haml_tag :div, :id => 'post', :class => 'large'
>
> > instead of the much simpler
>
> > haml_tag "div#post.large"
>
> > Does anyone have any suggestions on how to implement this. I'm sure
> > parsing "div#post.large" is already implemented somewhere, but where?
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Haml" group.
> > To post to this group, send email to ha...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > haml+uns...@googlegroups.com <haml%2Bunsu...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages