[Rails] Pretty-Printing (X)HTML Output

Scott Mathieson
Sun, 19 Mar 2006 03:24:30 -0000

Cheers Ben, I just thought I was missing something obvious - although I guess
Builder could be called that! - "just output xml and stop mincing about
already!!!"

I _had_ overlooked one rhtml file''s tabs though so at least
it''s all coming
out neatly, if not indented, now.

builder test it is then, thanks again.




On Sunday 19 March 2006 03:11, Ben Munat wrote:
> Alas Scott, html output seems to get no respect in the rails world... The
> books, the tutorials, the apidocs... nothing ever says what specific html
> the magic rails incantations will produce. And what it produced is thrown
> all willy-nilly into the page. Same thing in the java world though... no
> one cares about html. Sigh.
>
> Anyway, I''ve seen folks recommend the ruby-tidy bridge[1]. Also I
would
> think that if you built your pages with Builder[2] (as xhtml docs), that
> would probably create a pretty-printed dump.
>
> Good luck,
>
> b
>
> [1]http://tidy.rubyforge.org/
> [2]http://api.rubyonrails.com/classes/Builder/XmlMarkup.html