func MarkdownLink(rpcClient rpc.Client, input string, includeDesc bool) string {
	parser := parser.NewIssueReferenceParser()
	issueReference := parser.Parse(input)
	issueMatches := issueRegex.FindStringSubmatch(input)
	discussionMatches := discussionRegex.FindStringSubmatchIndex(input)
	repoMatches := repoRegex.FindStringSubmatch(input)
	if issueReference.HasIssue() {
		url := fmt.Sprintf("https://github.com/%s/issues/%s", issueReference.Repo(), issueReference.Issue)
		return formatIssue(rpcClient, url, issueReference.Repo(), issueReference.Issue, includeDesc)
	}
	if issueMatches != nil {
		url := issueMatches[1]
		repo := fmt.Sprintf("%s/%s", issueMatches[2], issueMatches[3])
		issue := issueMatches[5]
		return formatIssue(rpcClient, url, repo, issue, includeDesc)
	}
	if discussionMatches != nil {
		template := "[@$2/$3#$4]($1)"
		result := []byte{}
		result = discussionRegex.ExpandString(result, template, input, discussionMatches)
		return string(result)
	}
	if repoMatches != nil && repoMatches[4] != "/" {
		url := repoMatches[1]
		repo := fmt.Sprintf("%s/%s", repoMatches[2], repoMatches[3])
		return formatRepo(rpcClient, url, repo, includeDesc)
	}
	return input
}
MarkdownLink looks for a github issue or PR URL and converts it to a markdown link.

"https://github.com/zerowidth/camper_van/issues/1" becomes a markdown link
with link text "zerowidth/camper_van#1".
package snippets
import (
	"fmt"
	"regexp"
	"strings"
	"time"
	"github.com/zerowidth/gh-shorthand/pkg/parser"
	"github.com/zerowidth/gh-shorthand/pkg/rpc"
)
var repoRegex = regexp.MustCompile(`(https: 
var issueRegex = regexp.MustCompile(`(https: 
var discussionRegex = regexp.MustCompile(`(https: 