views:

99

answers:

2

I have this Haml:

#index-header
  %h1 Supersonic Mac Software.
  %p Some motto
%h1 Our Software
  %p Which will once becoume your's
.third-column
  %h2 Product 1
  %p LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL
.third-column
  %h2 Product 2
  %p LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL
.third-column
  %h2 Product 3
  %p LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL

And I get this error:

Haml::SyntaxError in Static#home

Showing app/views/static/home.html.haml where line #5 raised:

Illegal nesting: content can't be both given on the same line as %h1 and nested within it.

What am I doing wrong? Thanks.

+1  A: 

I think it's complaining because you have a <p> element inside an <h1> tag. (Line 4 in your code.)

Deniz Dogan
A: 

It's complaining because you have content on the same line as your %h1 tag (Our Software) and nested beneath it (%p Which will once becoume your's), just like the error message says.

nex3