Yang,

Both your original test and the ndx.html document seem  to test fine in 
3.0.0.rc.5 back to 2.2.17. 
(It doesn't work in 2.1.10 but that is probably due to other problems in gem 
compatibility since it is so old).

You might want to consider getting your admin to clean up the old gems on your 
machine.  I was having issues
until I cleaned the old gems out of 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 
(on OS X).

Matt

PS Interesting to see the differences in how html2haml works from version 2 to 
3.


$ gem list | g haml
haml (3.0.0.rc.5, 2.2.24, 2.2.17, 2.0.10)

$ wget -q -O- 'http://google.com/' | html2haml | fgrep '</'

$ wget -q -O- 'http://google.com/' | html2haml _2.2.24_ | fgrep '</'

$ wget -q -O- 'http://google.com/' | html2haml _2.2.17_ | fgrep '</'

$ wget -q -O- 'http://google.com/' | html2haml _2.0.10_ | fgrep '</'
undefined method `length' for {}:Hpricot::Attributes

$ cat ndx.html
<!DOCTYPE html>
<html>
<body>
<textarea>text</textarea>
<nobr><span>blah</span></nobr>
<form>form</form>
<center>center</center>
</body>
</html>

$ html2haml ndx.html 
!!!
%html
  %body
    %textarea text
    %nobr/
    %span blah
    %form form
    %center center

$ html2haml _2.2.24_ ndx.html 
!!!
%html
  %body
    %textarea
      text
    %nobr
    %span
      blah
    %form
      form
    %center
      center

$ html2haml _2.2.17_ ndx.html 
!!!
%html
  %body
    %textarea
      text
    %nobr
    %span
      blah
    %form
      form
    %center
      center

$ html2haml _2.0.10_ ndx.html 
private method `scan' called for nil:NilClass


$ html2haml --version
Haml/Sass 3.0.0.rc.5 (Classy Cassidy)

$ html2haml _2.2.24_ --version
Haml/Sass 2.2.24 (Powerful Penny)

$ html2haml _2.2.17_ --version
Haml/Sass 2.2.17 (Powerful Penny)

$ html2haml _2.0.10_ --version
Haml 2.0.10

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