The formatting is still a little screwy... why not
pastie<http://pastie.caboo.se>it?

In general, you don't need to add an empty comment line (-#) after a
multiline block unless it's immediately followed by another such block.
Also, for attributes, you can do

  %element{attributes}

where attributes is a helper method that returns an attribute hash.

On 11/6/07, Rich Morin <[EMAIL PROTECTED]> wrote:
>
>
> Gack - formatting problems; try again...
>
>   !!! Strict//EN
>
>   %html{ :xmlns      => 'http://www.w3.org/1999/
> xhtml',                       |
>          :'xml:lang' =>
> 'en',                                                 |
>          :lang       =>
> 'en' }                                                |
>   -#
>
>     %head
>           %meta{ :http-equiv => 'Content-
> Type',                                   |
>                  :content    => 'text/html;
> charset=utf-8' }                      |
>           -#
>
>
> On Nov 6, 10:59 am, Rich Morin <[EMAIL PROTECTED]> wrote:
> > For reasons that I don't understand, I can't even make the following
> > code work:
> >
> > !!! Strict//EN
> >
> > %html{ :xmlns      => 'http://www.w3.org/1999/
> > xhtml',                       |
> >        :'xml:lang' =>
> > 'en',                                                 |
> >        :lang       =>
> > 'en' }                                                |
> > -#
> >
> >   %head
> >         %meta{ :http-equiv => 'Content-
> > Type',                                   |
> >                :content    => 'text/html;
> > charset=utf-8' }                      |
> >         -#
> >
> > Comments? Clues? Suggestions?
> >
> > -r
> >
> > On Nov 6, 10:01 am, Rich Morin <[EMAIL PROTECTED]> wrote:
> >
> > > My motivation in using HAML is to have code that is easy to read,
> > > prints nicely, etc.  If I want awkward syntax, I know where to find
> > > it (:-).  I'm cool with putting Ruby methods in helpers, but what
> > > about tidying up long HAML attributes, as:
> >
> > >   %a{ :target => '_new',                                     |
> > >       :href   => 'https://my.foo.net/p/ops/bar_webcam'+    |
> > >                  "[EMAIL PROTECTED]" } View Bar                 |
> > >     -#
> > >     View Bar
> >
> > > and
> >
> > >   %div{ :style => 'border:     1px solid #aaa;               |
> > >                    padding:    10px;                         |
> > >                    background: #eee;' }                      |
> > >   -#
> >
> > > Long lines are harder to read.  Please add some syntax for those
> > > of us that like to keep things short, nicely lined up, etc.
> >
> > > On Aug 14, 9:26 pm, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
> >
> > > > Yep. The syntax is intentionally awkward. It's part of our effort to
> > > > discourage people from using pipes at all
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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