Commit dfee4e37 authored by Tristian Flanagan's avatar Tristian Flanagan Committed by cjihrig
Browse files

module: fix column offsets in errors

Because Node modules are wrapped, errors on the first line
of a file leak the wrapper to the user and report the wrong
column number. This commit adds a line break to the module
wrapper so that the first line is treated the same as all
other lines. To compensate for the additional line, a line
offset of -1 is also applied to errors.

Fixes: https://github.com/nodejs/node/issues/2860
PR-URL: https://github.com/nodejs/node/pull/2867


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
parent 94c3507f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment