hdoc-tools 0.18.5 → 0.18.7

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
@@ -447,12 +447,12 @@
447
447
  }
448
448
  if (pdf_size > 0) pdf_created++;
449
449
 
450
+ // Wrap h2 and h3 tags, plus content, in id'd divs
451
+ html_txt = hdoc.wrapHContent(html_txt);
452
+
450
453
  if (inline_content) html_txt = `${fm_header_content}\n${html_txt}`;
451
454
  else html_txt = `${fm_header_content}\n${doc_header}\n${html_txt}`;
452
455
 
453
- // Wrap h2 and h3 tags, plus content, in id'd divs
454
- const h_html_txt = hdoc.wrapHContent(html_txt);
455
-
456
456
  let relative_path = file_path.relativePath;
457
457
  if (
458
458
  !bc[relative_path.replace(".html", "")] &&
@@ -461,7 +461,7 @@
461
461
  relative_path = relative_path.replace("/index.html", "");
462
462
  }
463
463
 
464
- const index_data = hdoc_index.transform_html_for_index(h_html_txt);
464
+ const index_data = hdoc_index.transform_html_for_index(html_txt);
465
465
 
466
466
  index_data.sections.forEach(section => {
467
467
  index_records.push({
@@ -808,11 +808,12 @@
808
808
  }
809
809
  if (pdf_size > 0) pdf_created++;
810
810
 
811
+ // Wrap h2 and h3 tags, plus content, in id'd divs
812
+ html_txt = hdoc.wrapHContent(html_txt);
813
+
811
814
  if (inline_content) html_txt = `${fm_header}\n${html_txt}`;
812
815
  else html_txt = `${fm_header}\n${doc_header}\n${html_txt}`;
813
816
 
814
- // Wrap h2 and h3 tags, plus content, in id'd divs
815
- const h_html_txt = hdoc.wrapHContent(html_txt);
816
817
 
817
818
  // Save HTML into HTML file
818
819
  const target_file = file_path.path.replace(
@@ -836,7 +837,7 @@
836
837
  relative_path = relative_path.replace("/index.html", "");
837
838
  }
838
839
 
839
- const index_data = hdoc_index.transform_html_for_index(h_html_txt);
840
+ const index_data = hdoc_index.transform_html_for_index(html_txt);
840
841
 
841
842
  index_data.sections.forEach(section => {
842
843
  index_records.push({