There's definitely some difference between HTML and XML for ndx.html:
http://gist.github.com/396720

I'm really not sure what this closing-tag thing is. I'm at a loss for
explanations...

On Mon, May 10, 2010 at 3:26 PM, Yang Zhang <[email protected]> wrote:

> If you look at the ndx.haml case, that exhibits the indentation bugs
> I'm referring to -- they're not due to HTML vs. XML differences, but
> rather due to the failure to recognize the closing tags.
>
> Any other ideas as to where the problem might lie, besides hpricot?
> I'm not sure where to begin to debug this problem, which as you say is
> likely some sort of configuration issue.
>
> On Mon, May 10, 2010 at 3:18 PM, Nathan Weizenbaum <[email protected]>
> wrote:
> > The wrong-indentation-levels thing could be because you're trying to
> parse
> > it as an HTML document, not as an XML document. You can use the -x flag
> to
> > turn on XML parsing.
> >
> > On Mon, May 10, 2010 at 3:15 PM, Yang Zhang <[email protected]>
> wrote:
> >>
> >> Argh, this is still happening, even after 0.6 was removed.
> >>
> >> Also, not only are there extraneous closing tags, but the HTML is
> >> actually getting mis-parsed: things are ending up with the wrong
> >> indentation levels.
> >>
> >> Here are all the gems I see:
> >>
> >> $ gem list
> >>
> >> *** LOCAL GEMS ***
> >>
> >> compass (0.10.0.rc5, 0.8.17)
> >> cooloptions (1.1.1)
> >> fancy-buttons (0.5.1)
> >> fastthread (1.0.1)
> >> ferret (0.11.6)
> >> fsxtrader (1.0.0)
> >> gettext (1.90.0)
> >> haml (3.0.0, 3.0.0.rc.5)
> >> highline (1.4.0)
> >> hoe (1.8.0, 1.5.1)
> >> hpricot (0.8.2)
> >> lockfile (1.4.3)
> >> mechanize (0.7.5)
> >> mime-types (1.15)
> >> mustache (0.11.0)
> >> ncurses (0.9.1)
> >> net-ssh (2.0.0)
> >> rake (0.8.3, 0.8.1)
> >> rmail (1.0.0)
> >> rubyforge (1.0.0, 0.4.5)
> >> rubygems-update (1.1.0)
> >> sup (0.6, 0.5)
> >> trollop (1.7.2)
> >>
> >>
> >> On Sun, May 9, 2010 at 7:08 PM, Matt Martini <[email protected]>
> >> wrote:
> >> > 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]<haml%[email protected]>
> .
> >> > For more options, visit this group at
> >> > http://groups.google.com/group/haml?hl=en.
> >> >
> >>
> >>
> >>
> >> --
> >> Yang Zhang
> >> http://yz.mit.edu/
> >>
> >> --
> >> 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] <haml%[email protected]>
> .
> >> For more options, visit this group at
> >> http://groups.google.com/group/haml?hl=en.
> >>
> >
> > --
> > 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] <haml%[email protected]>.
> > For more options, visit this group at
> > http://groups.google.com/group/haml?hl=en.
> >
>
>
>
> --
> Yang Zhang
> http://yz.mit.edu/
>
> --
> 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] <haml%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/haml?hl=en.
>
>

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