hdoc-tools 0.29.1 → 0.29.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/hdoc-validate.js +5 -4
  2. 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(".internal.hornbill.com")) {
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.29.1",
3
+ "version": "0.29.3",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {