Skip to content

Commit 6e789d5

Browse files
committed
Update log file display format to simplify line count representation
1 parent 4abb674 commit 6e789d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/logViewer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class LogViewerProvider implements vscode.TreeDataProvider<LogFile>, vsco
5252
return files.map(file => {
5353
const filePath = path.join(dir, file);
5454
const lineCount = this.getLineCount(filePath);
55-
const logFile = new LogFile(`${file} (Lines: ${lineCount})`, vscode.TreeItemCollapsibleState.Collapsed, {
55+
const logFile = new LogFile(`${file} (${lineCount})`, vscode.TreeItemCollapsibleState.Collapsed, {
5656
command: 'magento-log-viewer.openFile',
5757
title: 'Open Log File',
5858
arguments: [filePath]
@@ -78,7 +78,7 @@ export class LogViewerProvider implements vscode.TreeDataProvider<LogFile>, vsco
7878
return files.map(file => {
7979
const filePath = path.join(dir, file);
8080
const lineCount = this.getLineCount(filePath);
81-
return new LogFile(`${file} (Lines: ${lineCount})`, vscode.TreeItemCollapsibleState.None, {
81+
return new LogFile(`${file} (${lineCount})`, vscode.TreeItemCollapsibleState.None, {
8282
command: 'magento-log-viewer.openFile',
8383
title: 'Open Log File',
8484
arguments: [filePath]
@@ -119,8 +119,8 @@ export class LogFile extends vscode.TreeItem {
119119
public readonly command?: vscode.Command
120120
) {
121121
super(label, collapsibleState);
122-
this.description = this.label.match(/\(Lines: \d+\)/)?.[0] || '';
123-
this.label = this.label.replace(/\(Lines: \d+\)/, '').trim();
122+
this.description = this.label.match(/\(\d+\)/)?.[0] || '';
123+
this.label = this.label.replace(/\(\d+\)/, '').trim();
124124
}
125125

126126
iconPath = {

0 commit comments

Comments
 (0)