Commit e35e68d7 authored by NGPixel's avatar NGPixel

fix: exclude assets from internal link detection (#1189)

parent 3d6b04f7
...@@ -53,7 +53,11 @@ module.exports = { ...@@ -53,7 +53,11 @@ module.exports = {
} }
// -> Check for system prefix // -> Check for system prefix
if (!reservedPrefixes.test(href) && !exactReservedPaths.test(href)) { if (reservedPrefixes.test(href) || exactReservedPaths.test(href)) {
$(elm).addClass(`is-system-link`)
} else if (href.indexOf('.') >= 0) {
$(elm).addClass(`is-asset-link`)
} else {
let pagePath = null let pagePath = null
// -> Add locale prefix if using namespacing // -> Add locale prefix if using namespacing
...@@ -91,8 +95,6 @@ module.exports = { ...@@ -91,8 +95,6 @@ module.exports = {
}) })
$(elm).addClass(`is-internal-link`) $(elm).addClass(`is-internal-link`)
} else {
$(elm).addClass(`is-system-link`)
} }
} else { } else {
$(elm).addClass(`is-external-link`) $(elm).addClass(`is-external-link`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment