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 +2 -1
- package/hdoc-validate.js +5 -1
- package/package.json +1 -1
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
|
-
|
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
|
|