MCPcopy Create free account
hub / github.com/Noumena-Network/code / linkifyIssueReferences

Function linkifyIssueReferences

src/utils/markdown.ts:710–723  ·  view source on GitHub ↗

* Replaces owner/repo#123 references with clickable hyperlinks to GitHub.

(text: string)

Source from the content-addressed store, hash-verified

708 * Replaces owner/repo#123 references with clickable hyperlinks to GitHub.
709 */
710function linkifyIssueReferences(text: string): string {
711 if (!supportsHyperlinks()) {
712 return text
713 }
714 return text.replace(
715 ISSUE_REF_PATTERN,
716 (_match, prefix, repo, num) =>
717 prefix +
718 createHyperlink(
719 `https://github.com/${repo}/issues/${num}`,
720 `${repo}#${num}`,
721 ),
722 )
723}
724
725function numberToLetter(n: number): string {
726 let result = ''

Callers 1

formatTokenFunction · 0.85

Calls 2

supportsHyperlinksFunction · 0.85
createHyperlinkFunction · 0.85

Tested by

no test coverage detected