On Nov 27, 3:03 pm, Nathan Weizenbaum <[email protected]> wrote:
> If I were redesigning Haml from scratch, I'd actually try to make it *easier
> * to write tags and *harder* to write content. That is, I'd have the tag be
> the default and the content require an extra character. Something like this:
>
>     html
>       head
>         title foo
>       body
>         p
>           > This is text.
>           > I like text!
>

It seems to me you could support that in a way that does not break old
HAML code.

Every node that is followed by an indented block could be implicitly
treated a tag.

Instead of this:

%one
  %two
    %three Hey there
%br
%hr

I could write this:

one
  two
    three<
      Hey there
%br
%hr

Instead of this:

#content
  .left.column
    %h2 Welcome to our site!
    %p= print_information

I could write this:

#content
  .left.column
    h2<
        Welcome to our site!
    p<
        = print_information

The percent signs do seem awfully crufty, and I am not sure what
purpose they really serve, except to call out which lines have
indentation blocks following them.  You would still need the percent
signs for hr, br, and friends, although you could special-case them.

--

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.


Reply via email to