MCPcopy Create free account
hub / github.com/Justineo/github-hovercard / replaceLink

Function replaceLink

src/hovercard.js:941–943  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

939 }
940
941 function replaceLink(text) {
942 return text.replace(/\b(https?:\/\/[^\s]+)/gi, '<a href="$1">$1</a>')
943 }
944
945 // Code via underscore's _.compose
946 function compose(...fns) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected