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 CHANGED
@@ -307,22 +307,24 @@
307
307
 
308
308
  if (fm_content.length >= 0) {
309
309
  fm_content.forEach(function (fm_prop) {
310
- const fm_property = fm_prop.split(':');
311
- if (fm_property[0] && fm_property[0].trim().length > 0 && fm_property[1] && fm_property[1].trim().length > 0) {
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: fm_property[0].trim(),
314
- value: fm_property[1].trim()
315
+ id: fm_id.trim(),
316
+ value: fm_val.trim()
315
317
  });
316
318
 
317
- if (fm_property[0].trim() === 'title') {
319
+ if (fm_id.trim() === 'title') {
318
320
  fm_contains_title = true;
319
- doc_title = fm_property[1].trim();
321
+ doc_title = fm_val.trim();
320
322
  }
321
- if (fm_property[0].trim() === 'type') {
322
- doc_type = fm_property[1].trim();
323
+ if (fm_id.trim() === 'type') {
324
+ doc_type = fm_val.trim();
323
325
  }
324
- if (fm_property[0].trim() === 'reading-time') {
325
- book_read_time += parseInt(fm_property[1].trim(), 10);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.8.33",
3
+ "version": "0.8.35",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {
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>