Reformat with Hpricot?


Here’s how to indent with REXML:

doc =’’)
indent_spaces = 2
doc.write($stdout, indent_space)

That produces:

How can Hpricot “pretty print” like that??

Very interesting question. I don’t know the answer, but I’ll bump
this post for ya!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs