From 5f6a7655ce2f1e073127d47b2d027cbf2612d1f8 Mon Sep 17 00:00:00 2001 From: Teddy Katz Date: Wed, 1 Aug 2018 21:37:35 -0700 Subject: [PATCH] Build: ensure URL fragments remain in documentation links (fixes #10717) (#10720) --- Makefile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.js b/Makefile.js index cd756a746af..902ee585762 100644 --- a/Makefile.js +++ b/Makefile.js @@ -745,7 +745,7 @@ target.gensite = function(prereleaseVersion) { ].join("\n"); // 6. Remove .md extension for relative links and change README to empty string - text = text.replace(/\((?!https?:\/\/)([^)]*?)\.md.*?\)/g, "($1)").replace("README.html", ""); + text = text.replace(/\((?!https?:\/\/)([^)]*?)\.md(.*?)\)/g, "($1$2)").replace("README.html", ""); // 7. Check if there's a trailing white line at the end of the file, if there isn't one, add it if (!/\n$/.test(text)) {