CraigWilliams/BeautifyRuby — pull request #66 by masal (2013-12-27 13:06:11+00:00)
Title: Don't return partial results when htmlbeautifier raises an exception

When htmlbeautifier raises an exception, results that have already been written to stdout in erbbeautify.rb are applied to the erb template and the rest of the template is lost.

For example the following erb snippet:
```
<% if cond
# This comment causes an "Outdented too far" error on line 5
%>
True
<% else %>
False
<% end %>
```
will be beautified to this:
```
<% if cond
# This comment causes an "Outdented too far" error on line 5
%>
True
```
This PR changes the erbbeautify.rb to
+ processes the whole template before writing the result to stdout
+ write an empty string on error. ST will then show the "Error: invalid output. Check your ruby interpreter settings" message instead of producing incorrect output.