diff options
Diffstat (limited to 'lib/error_highlight/base.rb')
-rw-r--r-- | lib/error_highlight/base.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/error_highlight/base.rb b/lib/error_highlight/base.rb index fc23508a5d..696df76ff9 100644 --- a/lib/error_highlight/base.rb +++ b/lib/error_highlight/base.rb @@ -35,6 +35,7 @@ module ErrorHighlight @fetch = -> (lineno, last_lineno = lineno) do snippet = @node.script_lines[lineno - 1 .. last_lineno - 1].join("") + snippet += "\n" unless snippet.end_with?("\n") # It require some work to support Unicode (or multibyte) characters. # Tentatively, we stop highlighting if the code snippet has non-ascii characters. |