views:

75

answers:

1

This is my nhaml code

^ var title=""
!!! XML
!!! Strict
%html{xmlns="http://www.w3.org/1999/xhtml"}
  %head
    %title
      Nhaml Master #{title}
      _styles
    %body
  .page      
        %h1 = "hello world"
        _
        _scripts

The resulting HTML renders the last tags as such:

 </div>
  </body>
  <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.min.js" type="text/javascript">
  </script>

</html>

As _scripts is still at the indentation level of %body +1, why does it close body down before rendering _scripts?

+1  A: 

Does it work if you move the scripts above the partial? If so, then the partial may be to blame.

   %h1 = "hello world"
    _scripts
    _
Jonathan Julian
ah, yes it does. I'll investigate :)
borisCallens
It appeared my indentation at the partial's level was wrong. Good call :)
borisCallens