getLocation() seems to return lines starting at 0, therefore we have to add 1.

This fixes the off-by-one bug,
and is consistent with what is done at line 238 in 'parser.js'.
This commit is contained in:
Simone Deponti
2012-09-10 18:09:47 +02:00
committed by Luke Page
parent 28424ed6b9
commit fd7a829079

View File

@@ -1068,7 +1068,7 @@ less.Parser = function Parser(env) {
save();
if (env.dumpLineNumbers) {
sourceLineNumber = getLocation(i, input).line;
sourceLineNumber = getLocation(i, input).line + 1;
sourceFileName = getFileName(env);
}