[ruby/error_highlight] Suppress SyntaxError during RubyVM::AST.of
When the original source code is erb, RubyVM::AST.of does not work well. https://github.com/rails/rails/issues/42678. https://github.com/ruby/error_highlight/commit/b1572761a6
This commit is contained in:
parent
e105d93b4f
commit
3a95834739
@ -29,7 +29,7 @@ module ErrorHighlight
|
||||
|
||||
spot = ErrorHighlight.spot(node, **opts)
|
||||
|
||||
rescue Errno::ENOENT
|
||||
rescue Errno::ENOENT, SyntaxError
|
||||
end
|
||||
|
||||
if spot
|
||||
|
Loading…
x
Reference in New Issue
Block a user