hdoc-tools 0.9.0 → 0.9.2
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-validate.js
CHANGED
@@ -58,7 +58,7 @@
|
|
58
58
|
for (let i = 0; i < translate_output[key].length; i++) {
|
59
59
|
for (const spelling in translate_output[key][i]) {
|
60
60
|
if (translate_output[key][i].hasOwnProperty(spelling)) {
|
61
|
-
errors[htmlFile.relativePath].push(`${error_message} ${spelling}`);
|
61
|
+
errors[htmlFile.relativePath].push(`${error_message} ${spelling} should be ${translate_output[key][i][spelling].details}`);
|
62
62
|
}
|
63
63
|
}
|
64
64
|
}
|
@@ -74,6 +74,10 @@
|
|
74
74
|
const valid_url = hdoc.valid_url(links[i]);
|
75
75
|
if (!valid_url) {
|
76
76
|
// Could be a relative path, check
|
77
|
+
if (links[i].startsWith('/')) {
|
78
|
+
const link_root = links[i].split('/')[0];
|
79
|
+
if (link_root !== hdocbook_config.docId) continue;
|
80
|
+
}
|
77
81
|
isRelativePath(source_path, htmlFile, links[i]);
|
78
82
|
} else {
|
79
83
|
messages[htmlFile.relativePath].push(`Link is a properly formatted external URL: ${links[i]}`);
|
package/package.json
CHANGED
@@ -26,11 +26,11 @@ jobs:
|
|
26
26
|
- name: Install hdoc-tools
|
27
27
|
run: npm install hdoc-tools -g
|
28
28
|
|
29
|
-
# Run hdoc
|
29
|
+
# Run hdoc validate against checked-out content
|
30
30
|
- name: Perform Validation
|
31
31
|
id: hdocbuild
|
32
32
|
run: |
|
33
|
-
if result=`hdoc
|
33
|
+
if result=`hdoc validate 2>&1`; then
|
34
34
|
printf "Build Success!\n\n"
|
35
35
|
printf "$result"
|
36
36
|
exit 0
|
@@ -29,11 +29,11 @@ jobs:
|
|
29
29
|
- name: Install hdoc-tools
|
30
30
|
run: npm install hdoc-tools -g
|
31
31
|
|
32
|
-
# Run hdoc
|
32
|
+
# Run hdoc validate against checked-out content
|
33
33
|
- name: Perform Validation
|
34
34
|
id: hdocbuild
|
35
35
|
run: |
|
36
|
-
if result=`hdoc
|
36
|
+
if result=`hdoc validate 2>&1`; then
|
37
37
|
printf "Build Success!\n\n"
|
38
38
|
printf "$result"
|
39
39
|
exit 0
|