Skip to content

Commit

Permalink
Build: Do not strip .md extension from absolute URLs (#7222)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaicataldo authored and gyandeeps committed Sep 26, 2016
1 parent 27042d2 commit 299a563
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile.js
Expand Up @@ -658,8 +658,8 @@ target.gensite = function(prereleaseVersion) {
text = "---\ntitle: " + title + "\nlayout: doc\n---\n<!-- Note: No pull requests accepted for this file. See README.md in the root directory for details. -->\n\n" + text;
}

// 6. Remove .md extension for links and change README to empty string
text = text.replace(/\.md(.*?\))/g, ")").replace("README.html", "");
// 6. Remove .md extension for relative links and change README to empty string
text = text.replace(/\((?!https?:\/\/)(.*?)\.md.*?\)/g, "($1)").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)) {
Expand Down

0 comments on commit 299a563

Please sign in to comment.