From 30863e5fa69471fc50743fffca7d1d7c4d0d2626 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 26 Dec 2016 10:28:17 -0600 Subject: [PATCH] Fix conversion of npm package and source doc links. [ci skip] --- lib/main/build-site.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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,