diff --git a/src/index.js b/src/index.js index 4026ce1..bde6243 100644 --- a/src/index.js +++ b/src/index.js @@ -49,7 +49,9 @@ const customRule = { if (hrefSrc != null) { const url = new URL(hrefSrc, pathToFileURL(params.name)) const isRelative = - url.protocol === "file:" && !hrefSrc.startsWith("/") + url.protocol === "file:" && + !hrefSrc.startsWith("/") && + !hrefSrc.startsWith("#") if (isRelative) { const detail = `"${hrefSrc}"`