diff --git a/lib/main/build-site.js b/lib/main/build-site.js index 975c1867d..ab35da817 100644 --- a/lib/main/build-site.js +++ b/lib/main/build-site.js @@ -175,7 +175,11 @@ function build() { // Load markdown. .readFileSync(readmePath, 'utf8') // Uncomment docdown HTML hints. - .replace(/(<)!--\s*|\s*--(>)/g, '$1$2'); + .replace(/(<)!--\s*|\s*--(>)/g, '$1$2') + // Convert source and npm package links to anchors. + .replace(/\[source\]\(([^)]+)\) \[npm package\]\(([^)]+)\)/g, (match, href1, href2) => + `

source npm package

` + ); const $ = cheerio.load(marky(markdown, { 'enableHeadingLinkIcons': false,