Skip to content

Commit 0473452

Browse files
Copilotalexr00
andauthored
Adopt codicon tree item label for current issue in issues view (#8134)
* Initial plan * Adopt codicon tree item label for current issue in issues view Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> * Add escaping for special characters in issue titles Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 49ec1f3 commit 0473452

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/issues/issuesView.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,12 @@ export class IssuesTreeData
117117
};
118118

119119
if (this.stateManager.currentIssue(element.uri)?.issue.number === element.number) {
120-
treeItem.label = `✓ ${treeItem.label as string}`;
120+
// Escape any $(...) syntax to avoid rendering issue titles as icons.
121+
const escapedTitle = element.title.replace(/\$\([a-zA-Z0-9~-]+\)/g, '\\$&');
122+
const label: vscode.TreeItemLabel2 = {
123+
label: new vscode.MarkdownString(`$(check) ${escapedTitle}`, true)
124+
};
125+
treeItem.label = label as vscode.TreeItemLabel;
121126
treeItem.contextValue = 'currentissue';
122127
} else {
123128
const savedState = this.stateManager.getSavedIssueState(element.number);

0 commit comments

Comments
 (0)