hdoc-tools 0.29.3 → 0.30.0

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 +7 -0
  2. package/package.json +1 -1
package/hdoc-validate.js CHANGED
@@ -462,6 +462,13 @@ const e = require("express");
462
462
  if (link_segments[0] === "") link_segments.shift();
463
463
  const link_root = link_segments[0] === "_books" ? link_segments[1] : link_segments[0];
464
464
 
465
+ // Check for links with a _books path that have no specific file target
466
+ // We do need to exclude those with an extension though, for pages that link downloadable resources
467
+ if (link_segments[0] === "_books" && path.extname(links[i]) === '') {
468
+ const error_message = processErrorMessage(`Root relative page links should not include _books in the path: ${links[i]}`, markdown_paths.relativePath, markdown_content, links[i]);
469
+ errors[htmlFile.relativePath].push(error_message);
470
+ }
471
+
465
472
  // Checking for internal links in other books - can't easily validate those here, returning
466
473
  if (link_segments.length > 1 && link_root !== hdocbook_config.docId) {
467
474
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.29.3",
3
+ "version": "0.30.0",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {