hdoc-tools 0.8.33 → 0.8.35
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 +12 -10
- package/package.json +1 -1
- package/ui/index.html +2 -2
package/hdoc-build.js
CHANGED
@@ -307,22 +307,24 @@
|
|
307
307
|
|
308
308
|
if (fm_content.length >= 0) {
|
309
309
|
fm_content.forEach(function (fm_prop) {
|
310
|
-
const
|
311
|
-
|
310
|
+
const fm_id = fm_prop.slice(0, fm_prop.indexOf(':'));
|
311
|
+
const fm_val = fm_prop.slice(fm_prop.indexOf(':') + 1);
|
312
|
+
|
313
|
+
if (fm_id && fm_id.trim().length > 0 && fm_val && fm_val.trim().length > 0) {
|
312
314
|
fm_headers.push({
|
313
|
-
id:
|
314
|
-
value:
|
315
|
+
id: fm_id.trim(),
|
316
|
+
value: fm_val.trim()
|
315
317
|
});
|
316
318
|
|
317
|
-
if (
|
319
|
+
if (fm_id.trim() === 'title') {
|
318
320
|
fm_contains_title = true;
|
319
|
-
doc_title =
|
321
|
+
doc_title = fm_val.trim();
|
320
322
|
}
|
321
|
-
if (
|
322
|
-
doc_type =
|
323
|
+
if (fm_id.trim() === 'type') {
|
324
|
+
doc_type = fm_val.trim();
|
323
325
|
}
|
324
|
-
if (
|
325
|
-
book_read_time += parseInt(
|
326
|
+
if (fm_id.trim() === 'reading-time') {
|
327
|
+
book_read_time += parseInt(fm_val.trim(), 10);
|
326
328
|
fm_contains_reading_time = true;
|
327
329
|
}
|
328
330
|
}
|
package/package.json
CHANGED
package/ui/index.html
CHANGED
@@ -250,8 +250,8 @@
|
|
250
250
|
<span class="title">In This Document</span>
|
251
251
|
</div>
|
252
252
|
<div v-if="docApp.tableOfContents.length" class="panel-content">
|
253
|
-
<div v-for="tocItem in docApp.tableOfContents">
|
254
|
-
<a :href="tocItem.href">{{tocItem.eleText}}</a>
|
253
|
+
<div v-for="tocItem in docApp.tableOfContents" v-bind:class="{'ms-3':tocItem.tagName=='H3'}">
|
254
|
+
<a :href="tocItem.href">{{tocItem.eleText}} {{tocItem.tagName}}</a>
|
255
255
|
</div>
|
256
256
|
</div>
|
257
257
|
</div>
|