Skip to content

Commit 921f310

Browse files
committed
Make escape syntax more specific
1 parent 3e33ad2 commit 921f310

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/view/treeNodes/pullRequestNode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ export class PRNode extends TreeNode implements vscode.CommentingRangeProvider2
318318
if (COPILOT_ACCOUNTS[author.login]) {
319319
labelTitle = labelTitle.replace('[WIP]', '');
320320
}
321-
// Escape any $ in the title to avoid rendering PR titles as icons.
322-
label += labelTitle.replace(/[$]/g, '\\$');
321+
// Escape any $(...) syntax to avoid rendering PR titles as icons.
322+
label += labelTitle.replace(/\$\([a-zA-Z0-9~-]+\)/g, '\\$&');
323323

324324
if (isDraft) {
325325
label = `_${label}_`;

0 commit comments

Comments
 (0)