From fd7a8290791a59aa954923ae72acfbac5d2a7df1 Mon Sep 17 00:00:00 2001 From: Simone Deponti Date: Mon, 10 Sep 2012 18:09:47 +0200 Subject: [PATCH] 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'. --- lib/less/parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/less/parser.js b/lib/less/parser.js index ac279bd2..83b86dd7 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -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); }