2008/11/27 Bharat <[EMAIL PROTECTED]>:
>
> As I admitted up-front.  This is lack of my HTML skills that is also a
> factor.  Having said that,  there were a couple of things that stand
> out:
>
> 1.  I had the lines:
>   %h2
>     Sign In
>    as
>   %h2 Sign In
>
> And I got the Illegal nesting error.  It was not immediately apparent
> to me what I was doing wrong.  It still isn't, may be someone can
> explain?  I got around it by following examples in the CommunityEngine
> codebase and the online documentation.

%h2 Sign in
is allowed, as long as you don't put any other content nested into
that h2 tag on the next lines, then you are combining the inline
nesting style with a multiline nesting style, which isn't supported.

So:
%h2 Sign in
is the same as:
%h2
  Sign in

But:
%h2 Sign in
  and some more
  content in h2 on
  more lines

isn't allowed because you already started an inline nesting, and should be:
%h2
  Sign in
  and some more
  content in h2 on
  more lines

So, watch what you indent and what you put on the same line, since
both can't be combined.
It is also the reason why this wasn't allowed:
 %span#noscript {:style => "display:none;"}
   prob some more content here
because it saw the {:style} thing as *content* of the span tag, not as
attributes. As is also shown in the attribute examples on
http://haml.hamptoncatlin.com/docs/rdoc/classes/Haml.html
Although, the documentation there says "The hash is placed after the
tag is defined.", which might be clearer if it said: "The hash is
placed _directly after_ after the tag is defined." or something
similar.

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