diff --git a/src/BacklinksTreeDataProvider.ts b/src/BacklinksTreeDataProvider.ts index bc70f96..728db16 100644 --- a/src/BacklinksTreeDataProvider.ts +++ b/src/BacklinksTreeDataProvider.ts @@ -161,7 +161,7 @@ class BacklinkItem extends vscode.TreeItem { if (s < 20) { s = 0; } - return line.substr(5); + return line.substr(s); } else if (this.locations) { d = `${this.locations?.length} References`; } diff --git a/src/ReferenceSearch.ts b/src/ReferenceSearch.ts index d557ec0..bb9cea0 100644 --- a/src/ReferenceSearch.ts +++ b/src/ReferenceSearch.ts @@ -63,11 +63,11 @@ export class ReferenceSearch { } Array.from(candidates || []).map((match) => { if (matchesQuery(match, contextWord)) { - console.log( - `${lineNum} Regex Range: (${match.index}, ${(match.index || 0) + match[0].length}) ${ - match[0] - } ` - ); + // console.log( + // `${lineNum} Regex Range: (${match.index}, ${(match.index || 0) + match[0].length}) ${ + // match[0] + // } ` + // ); let s = match.index || 0; let e = s + match[0].length; let r: RawRange = {