hdoc-tools 0.29.1 → 0.29.3
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/hdoc-validate.js +5 -4
- package/package.json +1 -1
package/hdoc-validate.js
CHANGED
@@ -498,7 +498,7 @@ const e = require("express");
|
|
498
498
|
}
|
499
499
|
|
500
500
|
// Skip internal.hornbill.com link validation if run outside of the Hornbill network
|
501
|
-
if (links[i].toLowerCase().includes("
|
501
|
+
if (links[i].toLowerCase().includes("internal.hornbill.com")) {
|
502
502
|
// DNS lookup internal docs endpoint
|
503
503
|
const hostname = 'docs-internal.hornbill.com';
|
504
504
|
let on_int_net = false;
|
@@ -529,8 +529,9 @@ const e = require("express");
|
|
529
529
|
}
|
530
530
|
|
531
531
|
if (
|
532
|
-
links[i].toLowerCase().includes("docs.hornbill.com") ||
|
533
|
-
links[i].toLowerCase().includes("docs-internal.hornbill.com")
|
532
|
+
(links[i].toLowerCase().includes("docs.hornbill.com") ||
|
533
|
+
links[i].toLowerCase().includes("docs-internal.hornbill.com")) &&
|
534
|
+
!markdown_paths.relativePath.includes('/_inline/')
|
534
535
|
) {
|
535
536
|
const error_message = processErrorMessage(`Hornbill Docs links should not be fully-qualified: ${links[i]}`, markdown_paths.relativePath, markdown_content, links[i]);
|
536
537
|
errors[htmlFile.relativePath].push( error_message );
|
@@ -577,7 +578,7 @@ const e = require("express");
|
|
577
578
|
// Validate that image is a valid URL first
|
578
579
|
if (!hdoc.valid_url(links[i])) {
|
579
580
|
|
580
|
-
if (!links[i].startsWith("/")) {
|
581
|
+
if (!links[i].startsWith("/") && !markdown_paths.relativePath.includes('/_inline/')) {
|
581
582
|
const error_message = processErrorMessage(`Root relative image links should start with a forward-slash: ${links[i]}`, markdown_paths.relativePath, markdown_content, links[i]);
|
582
583
|
errors[htmlFile.relativePath].push(error_message);
|
583
584
|
}
|