Here’s how you install `tidy` (html-tidy) with homebrew and get the latest HTML5 version:
###Tap Dupes
First make sure you tap the [dupes](https://github.com/Homebrew/homebrew-dupes) repository:
brew tap homebrew/dupes
Next you just need to use:
brew install homebrew/dupes/tidy –HEAD
Then you are good to go!
If you have any problems you may want to try a few of these things:
###Remove old / other versions:
brew remove tidy
brew cleanup tidy
Then re-run the install command
### Check your path
If you run “tidy” and get an old version, try typing `which tidy`
If you see this you’re seeing the version that comes with Mac OS X:
/usr/bin/tidy
You should instead be seeing something like:
/usr/local/bin/tidy
You can check you version by doing:
tidy -v
This is wrong:
HTML Tidy for Mac OS X released on 31 October 2006 – Apple Inc. build 15.10
This is correct:
HTML Tidy for HTML5 (experimental) for Mac OS X https://github.com/w3c/tidy-html5/tree/c63cc39
If when you are running just `tidy` you are getting the older version you need to check that your path variable is set correctly to use the homebrew bin directory before using the system bin directory. See [this question](http://superuser.com/questions/324616/how-should-i-set-the-path-variable-on-my-mac-so-the-hombrew-installed-tools-are)
Your path should be in some sort of orders similar to this:
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
You can also try and run `/usr/local/bin/tidy -v` to see if the newer version has been installed successfully.
###Update Homebrew
You may also need to run `brew update` ( or even `brew upgrade` ) to get the latest versions of repositories that you need to run and build `tidy`
One Response to homebrew tidy html5