Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Commit

Permalink
Remove the stupid fix for row lines
Browse files Browse the repository at this point in the history
  • Loading branch information
XVincentX committed Aug 27, 2016
1 parent b460c00 commit 88ca12c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions server/src/refractUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function createLineReferenceFromSourceMap(refractSourceMap, document: str
}

const startRow = document.substring(0, sourceMap.charIndex).split(/\r?\n/g).length - 1;
const endRow = startRow + (sourceLines.length > 1 ? sourceLines.length - 1 : sourceLines.length) - 1; // - 1 for the current line, - 1 for the last nextline
const endRow = startRow + sourceLines.length - 1;

const startIndex = documentLines[startRow].indexOf(lodash.head(sourceLines));
const endIndex = documentLines[endRow].length;
Expand Down Expand Up @@ -112,8 +112,7 @@ export function extractSymbols(element: any,
Thing is there is no really source map here and I do not want to solve this
thing in this release. The long term idea would be to wait till the underlying
parser will be updated to generate sourcemaps on generated content as well
and everybody will be happy; till that moment:
😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱😱
and everybody will be happy; till that moment, please bear with me.
*/

let sourceMap = undefined;
Expand Down

0 comments on commit 88ca12c

Please sign in to comment.