From 2fd7e6f095fe7129d481bb705172771dafa96550 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sun, 13 Jun 2021 02:35:35 -0400 Subject: [PATCH] Fixes 3rd party double auto-linking --- src/git/remotes/github.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/git/remotes/github.ts b/src/git/remotes/github.ts index 6928f51..22b96b4 100644 --- a/src/git/remotes/github.ts +++ b/src/git/remotes/github.ts @@ -15,7 +15,7 @@ import { } from '../models/models'; import { RichRemoteProvider } from './provider'; -const issueEnricher3rdParyRegex = /\b(\w+\\?-?\w+(?!\\?-)\/\w+\\?-?\w+(?!\\?-))\\?#([0-9]+)\b/g; +const issueEnricher3rdPartyRegex = /\b(\w+\\?-?\w+(?!\\?-)\/\w+\\?-?\w+(?!\\?-))\\?#([0-9]+)\b(?!]\()/g; const fileRegex = /^\/([^/]+)\/([^/]+?)\/blob(.+)$/i; const rangeRegex = /^L(\d+)(?:-L(\d+))?$/; @@ -52,7 +52,7 @@ export class GitHubRemote extends RichRemoteProvider { { linkify: (text: string) => text.replace( - issueEnricher3rdParyRegex, + issueEnricher3rdPartyRegex, `[$&](${this.protocol}://${this.domain}/$1/issues/$2 "Open Issue #$2 from $1 on ${this.name}")`, ), },