Saim
Saim

Reputation: 2523

Formatting HTML Source using Ruby

Is there any Ruby library available to format the HTML source. By formatting I mean removing the extra spacing, apply proper indentation etc.

I am already using Hpricot for parsing HTML. It would be nice if Hpricot could do this job. But I am not stick with Hpricot for the formatting stuff.

Thanks, Imran

Upvotes: 0

Views: 726

Answers (2)

Parker
Parker

Reputation: 8851

Extra spacing and formatting don't really matter in HTML, so regardless of the formatting and white space, the browser should display the code as the same.

Upvotes: 0

Related Questions