Skip to content

Commit

Permalink
Merge pull request #40 from SuyogSoti/master
Browse files Browse the repository at this point in the history
Make it so that the output will be a link to the line of the file of the todo instead of just text
  • Loading branch information
mt40 authored Jan 15, 2017
2 parents 479c571 + d46edfd commit 919157f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/types/TodoType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,18 @@ export class TodoType {
}

getDisplayString(): string {
let path = `${this.getFile().getName()}:${this.getLineNumber()}`;
let url = this.getFile().getFile().uri.toString();
// to take it to the properline
let middle = "#";
// what if the file is not saved?
if (url.split(":")[0].toString() == "untitled") {
middle = "; Line Number: ";
}
let path = url + middle + this.getLineNumber();
return `From ${path}\n----------------------------------\n${this.getContent()}`;
}

toString(): string {
return this.getFile().toString() + "\n" + this.getContent.toString();
return this.getFile() + "\n" + this.getContent;
}
}
}

0 comments on commit 919157f

Please sign in to comment.