Created
March 7, 2010 14:45
-
-
Save jpignata/324394 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Minimal | |
module Tidy | |
def to_tidy | |
pipe = IO.popen("tidy -q 2>/dev/null", "r+") | |
pipe.write to_s | |
pipe.close_write | |
pipe.read | |
end | |
end | |
end | |
class String | |
include Minimal::Tidy | |
end | |
p"<p>blah?<p>".to_tidy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment