hdoc-tools 0.9.40 → 0.9.41
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 +6 -1
- package/hdoc.js +1 -1
- package/package.json +1 -1
package/hdoc-build.js
CHANGED
@@ -24,6 +24,7 @@
|
|
24
24
|
non_git_pdf_header_template_path = path.join(__dirname, 'templates', 'pdf-header-non-git.html'),
|
25
25
|
pdf_template_path = path.join(__dirname, 'templates', 'pdf'),
|
26
26
|
pdf_template_file_path = path.join(pdf_template_path, 'template.html'),
|
27
|
+
regex_set_version = /^[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{0,6}$/,
|
27
28
|
regex_version = /^[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,6}$/;
|
28
29
|
|
29
30
|
let bc = {}, // Breadcrumbs map
|
@@ -620,7 +621,11 @@
|
|
620
621
|
|
621
622
|
hdocbook_config = require(hdocbook_path);
|
622
623
|
if (build_version !== '') {
|
623
|
-
|
624
|
+
if (build_version.match(regex_version)) {
|
625
|
+
hdocbook_config.version = build_version;
|
626
|
+
} else {
|
627
|
+
console.log(`\n[WARNING] Argument build version [${build_version}] does not match expected pattern, defaulting to version specified in book [${hdocbook_config.version}]\n`);
|
628
|
+
}
|
624
629
|
}
|
625
630
|
|
626
631
|
if (!hdocbook_config.version.match(regex_version)) {
|
package/hdoc.js
CHANGED