On Nov 27, 1:13 pm, Chris Eppstein <[email protected]> wrote: > The haml-spec project is creating a standard test suite for haml > implementations. A python implementation of Haml seems like a no-brainer... > I'm surprised one doesn't exist yet. >
This was the closest thing I found: http://lucumr.pocoo.org/2008/2/15/ghrml-haml-for-genshi Although I admire HAML, I am not striving to produce an exact clone. Regarding the haml-spec project, it might be a good idea to define a subset of HAML that only deals with indentation, without some of the Ruby integration and class/id sugar. It might facilitate cross- platform support. Here is the link to my Python code if anybody wants to adapt it more purely for HAML: http://www.djangosnippets.org/snippets/1819/ The Indenter class is probably the most reusable part. Some of the other methods are more geared to specific Django use cases. > As far as your new syntax ideas go with putting the content before the > markup, I'm not a big fan. Content may be king on the internet but it is > rarely the most important part for the programmer. I care about what the > and classes are for my elements and this is the part that haml optimizes so > nicely. Haml is awesome for structural markup. When it comes to markup for > "content" I often use markdown via the haml markdown filter. > Fair enough. Most of the structural stuff in Showell Markup does happen at the block level, where the markup does precede the content. If you keep the structural stuff mostly at the block level, the content will stand out via indentation, except when you get to more granular markup. It might make sense for me to more purely separate the three different filters, since some folks might not like the one- liner syntax or the Django-specific stuff, but they'll want to keep the HTML-block-tag indentation goodness. -- You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/haml?hl=en.
