Why are my script tags rendered outside my body tag?

170 Views Asked by At

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

There are 1 best solutions below

2
On BEST ANSWER

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

   %h1 = "hello world"
    _scripts
    _