Skip to content

Commit

Permalink
Merge pull request #439 from yvt/patch-1
Browse files Browse the repository at this point in the history
Show the correct source code line that has an error (fix #367)
  • Loading branch information
ivogabe committed Oct 8, 2016
2 parents dc2103c + fd6a3ca commit 526d08f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function fullReporter(fullFilename: boolean = false): Reporter {

if (error.tsFile) {
console.error('> ' + gutil.colors.gray('file: ') + (fullFilename ? error.fullFilename : error.relativeFilename) + gutil.colors.gray(':'));
const lines = error.tsFile.text.split(/(\r\n|\r|\n)/);
const lines = error.tsFile.text.split(/(?:\r\n|\r|\n)/);

const logLine = (lineIndex: number, errorStart: number, errorEnd?: number) => {
const line = lines[lineIndex];
Expand Down

0 comments on commit 526d08f

Please sign in to comment.