twilson63 / html2haml

Convert HTML Snippets to Haml
http://html2haml.heroku.com
MIT License
180 stars 82 forks source link

JavaScript bug #18

Closed drgullin closed 10 years ago

drgullin commented 11 years ago
<!doctype html>
<html>
  <head>
    <script>window.jQuery || document.write('<script src="./js/jquery.js">\x3C/script>');</script>
    <script src="./js/custom.js"></script>
  </head>
</html>

This code compiles to:

<!doctype html>
%html
  %head
    :javascript
      window.jQuery || document.write('<script src="./js/jquery.js">\x3C/script>');    %script{:src => "./js/custom.js"}

It can't be properly compiled again to HTML:

<!doctype html>
<html>
  <head>
    <script>
      window.jQuery || document.write('<script src="./js/jquery.js">\x3C/script>');    %script{:src => "./js/custom.js"}
    </script>
  </head>
</html>

Expected html2haml compilation result:

<!doctype html>
%html
  %head
    :javascript
      window.jQuery || document.write('<script src="./js/jquery.js">\x3C/script>');  
    %script{:src => "./js/custom.js"}
twilson63 commented 10 years ago

Should be working correctly now!