Can't touch #this

This commit is contained in:
vflyson 2017-02-20 04:09:46 -05:00
parent 05d90e6068
commit 3f499824f8

View file

@ -11,6 +11,10 @@ module.exports = {
if (anchors[i].getAttribute('href')) { if (anchors[i].getAttribute('href')) {
var anchor = anchors[i] var anchor = anchors[i]
var href = anchor.getAttribute('href').trim() 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) var absoluteURL = functions.resolve(absBasePath, href)
anchor.setAttribute('href', absoluteURL) anchor.setAttribute('href', absoluteURL)