From 29c11bebeca171ada16f452467494ffe4f29af1f Mon Sep 17 00:00:00 2001 From: John Mulhausen Date: Fri, 28 Jul 2017 14:16:43 -0700 Subject: [PATCH] Fix for index.md# Links (#3981) --- _layouts/docs.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_layouts/docs.html b/_layouts/docs.html index 570fad6d0e..61df667cdf 100644 --- a/_layouts/docs.html +++ b/_layouts/docs.html @@ -107,12 +107,14 @@ else %}{% assign edit_url = "" %}{% endif %} {% break %} {% endif %} {% endfor % var munged = false; var thisHREF = document.links[i].href; var originalURL = "{{ page.url }}"; + /* if (thisHREF.indexOf(baseHref + "#") > -1) { // hash fix //console.log('BEFORE: base:',baseHref,'thisHREF:',thisHREF,'originalURL:',originalURL); thisHREF = originalURL + thisHREF.replace(baseHref, ""); //console.log('AFTER: base:',baseHref,'thisHREF:',thisHREF,'originalURL:',originalURL); } + */ if ((thisHREF.indexOf(window.location.hostname) > -1 || thisHREF.indexOf('http') == -1) && document.links[i].className.indexOf("nomunge") < 0) { munged = true; thisHREF = thisHREF.replace(".md", "/").replace("/index/", "/");