lib/erb/formatter.rb in erb-formatter-0.4.1 vs lib/erb/formatter.rb in erb-formatter-0.4.2
- old
+ new
@@ -264,11 +264,12 @@
p RUBY_IN_: code if @debug
SyntaxTree::Command.prepend SyntaxTreeCommandPatch
code = begin
- SyntaxTree.format(code)
- rescue SyntaxTree::Parser::ParseError
+ SyntaxTree.format(code, @line_width)
+ rescue SyntaxTree::Parser::ParseError => error
+ p RUBY_PARSE_ERROR: error if @debug
code
end
lines = code.strip.lines
lines = lines[0...-1] if autoclose