From 7230e131511fc6e995c96160e6c3cf5fca76aa59 Mon Sep 17 00:00:00 2001 From: isaacs Date: Sun, 5 Jan 2020 16:19:03 -0800 Subject: [PATCH] docs: fix header parsing that was breaking misc config manpage PR-URL: https://github.com/npm/cli/pull/656 Credit: @isaacs Close: #656 Reviewed-by: @mikemimik --- scripts/docs-build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docs-build.js b/scripts/docs-build.js index e3cd2e9826f1e..390ea20be706e 100644 --- a/scripts/docs-build.js +++ b/scripts/docs-build.js @@ -15,7 +15,7 @@ fs.readFile(src, 'utf8', function (err, data) { } var result = data.replace(/@VERSION@/g, npm.version) - .replace(/---([\s\S]+)---/g, '') + .replace(/^---([\s\S]+?)---/g, '') .replace(/\[([^\]]+)\]\(\/cli-commands\/([^)]+)\)/g, replacer) .replace(/\[([^\]]+)\]\(\/configuring-npm\/([^)]+)\)/g, replacer) .replace(/\[([^\]]+)\]\(\/using-npm\/([^)]+)\)/g, replacer)