hdoc-tools 0.17.1 → 0.17.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.
Files changed (2) hide show
  1. package/hdoc-build.js +13 -4
  2. package/package.json +1 -1
package/hdoc-build.js CHANGED
@@ -548,7 +548,7 @@
548
548
  };
549
549
 
550
550
  const tidy_code_tags = function (markdown, file) {
551
- const json_to_tidy = markdown.match(/```json(\s|.)*?```/g);
551
+ const json_to_tidy = markdown.match(/```json[\r\n](\s|.)*?```/g);
552
552
  if (json_to_tidy && json_to_tidy.length > 0) {
553
553
  for (let i = 0; i < json_to_tidy.length; i++) {
554
554
  if (json_to_tidy[i] !== '') {
@@ -563,7 +563,7 @@
563
563
  }
564
564
  }
565
565
 
566
- const xml_to_tidy = markdown.match(/```xml(\s|.)*?```/g);
566
+ const xml_to_tidy = markdown.match(/```xml[\r\n](\s|.)*?```/g);
567
567
  if (xml_to_tidy && xml_to_tidy.length > 0) {
568
568
  for (let i = 0; i < xml_to_tidy.length; i++) {
569
569
  if (xml_to_tidy[i] !== '') {
@@ -630,9 +630,18 @@
630
630
  bc_link += redirects[bc_for_path[i].link].location;
631
631
  }
632
632
  } else {
633
- bc_link = bc_for_path[i].link.startsWith('/') ? bc_for_path[i].link : `/${bc_for_path[i].link}`;
633
+ if (bc_for_path[i].link) {
634
+ bc_link = bc_for_path[i].link.startsWith('/') ? bc_for_path[i].link : `/${bc_for_path[i].link}`;
635
+ } else {
636
+ bc_link = '';
637
+ }
638
+
639
+ }
640
+ if (bc_link !== '') {
641
+ 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`;
642
+ } else {
643
+ bc_tags += `\t\t\t\t<li class="mt-0 nav-bar-item">${bc_for_path[i].text}</li>\n`;
634
644
  }
635
- 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`;
636
645
  }
637
646
  } else {
638
647
  if (verbose) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.17.1",
3
+ "version": "0.17.3",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {