From 3f499824f8eec0e8c1ea6ee91e0cbcd62d3a7f68 Mon Sep 17 00:00:00 2001 From: vflyson Date: Mon, 20 Feb 2017 04:09:46 -0500 Subject: [PATCH] Can't touch #this --- modules/anchors.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/anchors.js b/modules/anchors.js index 7c4278c..65035cd 100644 --- a/modules/anchors.js +++ b/modules/anchors.js @@ -11,6 +11,10 @@ module.exports = { if (anchors[i].getAttribute('href')) { var anchor = anchors[i] var href = anchor.getAttribute('href').trim() + + // Do not touch hrefs which start with a pound sign + if (href[0] == '#') continue + var absoluteURL = functions.resolve(absBasePath, href) anchor.setAttribute('href', absoluteURL)