mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04:00
Issue #3092: Fix column numbers in sourcemaps to not be essentially random.
This commit is contained in:
@@ -69,7 +69,11 @@
|
||||
}
|
||||
newLines = helpers.count(fragment.code, "\n");
|
||||
currentLine += newLines;
|
||||
currentColumn = fragment.code.length - (newLines ? fragment.code.lastIndexOf("\n") : 0);
|
||||
if (newLines) {
|
||||
currentColumn = fragment.code.length - (fragment.code.lastIndexOf("\n") + 1);
|
||||
} else {
|
||||
currentColumn += fragment.code.length;
|
||||
}
|
||||
}
|
||||
js += fragment.code;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user