Browse Source

Fixes 3rd party double auto-linking

main
Eric Amodio 3 years ago
parent
commit
2fd7e6f095
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/git/remotes/github.ts

+ 2
- 2
src/git/remotes/github.ts View File

@ -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}")`,
),
},

Loading…
Cancel
Save