nuxt-link-checker 2.0.0-beta.8 → 2.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/inspect.mjs +2 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -185,7 +185,7 @@ function inspect(ctx, rules = DefaultInspections) {
|
|
|
185
185
|
const res = { error: [], warning: [], fix: ctx.link, link: ctx.link };
|
|
186
186
|
let link = ctx.link;
|
|
187
187
|
const url = parseURL(link);
|
|
188
|
-
if (!url.pathname && !url.protocol && !url.host && !link.startsWith("
|
|
188
|
+
if (!url.pathname && !url.protocol && !url.host && !isInvalidLinkProtocol(link) && !link.startsWith("mailto:") && !link.startsWith("#")) {
|
|
189
189
|
res.error.push({
|
|
190
190
|
name: "invalid-url",
|
|
191
191
|
scope: "error",
|
package/dist/runtime/inspect.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import RuleNoJavascript from "./inspections/no-javascript.mjs";
|
|
|
6
6
|
import RuleAbsoluteSiteUrls from "./inspections/absolute-site-urls.mjs";
|
|
7
7
|
import RuleRedirects from "./inspections/redirects.mjs";
|
|
8
8
|
import RuleNoErrorResponse from "./inspections/no-error-response-status.mjs";
|
|
9
|
+
import { isInvalidLinkProtocol } from "./inspections/util.mjs";
|
|
9
10
|
export const DefaultInspections = {
|
|
10
11
|
"missing-hash": RuleMissingHash(),
|
|
11
12
|
"no-error-response": RuleNoErrorResponse(),
|
|
@@ -19,7 +20,7 @@ export function inspect(ctx, rules = DefaultInspections) {
|
|
|
19
20
|
const res = { error: [], warning: [], fix: ctx.link, link: ctx.link };
|
|
20
21
|
let link = ctx.link;
|
|
21
22
|
const url = parseURL(link);
|
|
22
|
-
if (!url.pathname && !url.protocol && !url.host && !link.startsWith("
|
|
23
|
+
if (!url.pathname && !url.protocol && !url.host && !isInvalidLinkProtocol(link) && !link.startsWith("mailto:") && !link.startsWith("#")) {
|
|
23
24
|
res.error.push({
|
|
24
25
|
name: "invalid-url",
|
|
25
26
|
scope: "error",
|