We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 479c571 + d46edfd commit 919157fCopy full SHA for 919157f
1 file changed
src/types/TodoType.ts
@@ -26,11 +26,18 @@ export class TodoType {
26
}
27
28
getDisplayString(): string {
29
- let path = `${this.getFile().getName()}:${this.getLineNumber()}`;
+ let url = this.getFile().getFile().uri.toString();
30
+ // to take it to the properline
31
+ let middle = "#";
32
+ // what if the file is not saved?
33
+ if (url.split(":")[0].toString() == "untitled") {
34
+ middle = "; Line Number: ";
35
+ }
36
+ let path = url + middle + this.getLineNumber();
37
return `From ${path}\n----------------------------------\n${this.getContent()}`;
38
39
40
toString(): string {
- return this.getFile().toString() + "\n" + this.getContent.toString();
41
+ return this.getFile() + "\n" + this.getContent;
42
-}
43
+}
0 commit comments