hdoc-tools 0.9.51 → 0.9.52

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-build.js CHANGED
@@ -526,7 +526,8 @@
526
526
  let bc_tags = '\n';
527
527
  if (bc_for_path) {
528
528
  for (let i = 0; i < bc_for_path.length - 1; i++) {
529
- bc_tags += `\t\t\t\t<li class="mt-0 nav-bar-item"><a href="${bc_for_path[i].link}" class="ps-0 pe-0 text-decoration-none">${bc_for_path[i].text}</a></li>\n`;
529
+ const bc_link = bc_for_path[i].link.startsWith('/') ? bc_for_path[i].link : `/${bc_for_path[i].link}`;
530
+ bc_tags += `\t\t\t\t<li class="mt-0 nav-bar-item"><a href="${bc_link}" class="ps-0 pe-0 text-decoration-none">${bc_for_path[i].text}</a></li>\n`;
530
531
  }
531
532
  } else {
532
533
  if (verbose) {
package/hdoc-validate.js CHANGED
@@ -158,8 +158,12 @@
158
158
  let link_root = links[i].split('/');
159
159
  link_root = link_root[0] !== '' ? link_root[0] : link_root[1];
160
160
  if (link_root !== hdocbook_config.docId) continue;
161
+ isRelativePath(source_path, htmlFile, links[i]);
162
+ } else if (links[i].startsWith('#')) {
163
+ //Anchor - do nothing
164
+ } else {
165
+ errors[htmlFile.relativePath].push(`Root relative links should start with a forward-slash: ${links[i]}`);
161
166
  }
162
- isRelativePath(source_path, htmlFile, links[i]);
163
167
  } else {
164
168
  messages[htmlFile.relativePath].push(`Link is a properly formatted external URL: ${links[i]}`);
165
169
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.9.51",
3
+ "version": "0.9.52",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {