threedaymonk / htmlbeautifier

A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates.
MIT License
325 stars 59 forks source link

How to require? #2

Closed onknows closed 12 years ago

onknows commented 12 years ago

How do you require this. I installed this but on require 'htmlbeautifier' there is just a load error LoadError: no such file to load -- htmlbeautifier

threedaymonk commented 12 years ago

The configuration of this gem was a bit odd and out of date. I've fixed it up now, so if you install v0.0.7, you should be able to do this:

require "htmlbeautifier"
HtmlBeautifier::Beautifier.new($stdout).scan("<html>\n<body>\n</body>\n</html>")

and see this:

<html>
  <body>
  </body>
</html>
threedaymonk commented 12 years ago

I'm going to close this. Reopen it if you're still having trouble!