hdoc-tools 0.7.18 → 0.7.19

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-serve.js CHANGED
@@ -250,10 +250,7 @@
250
250
  return;
251
251
  }
252
252
 
253
- url = '';
254
- segs.forEach(function(urlSeg){
255
- if (urlSeg !== '' && urlSeg !== '_books') url += '/' + urlSeg;
256
- });
253
+ url = url.replace('/_books/', '/');
257
254
 
258
255
  console.log('URL Requested:', url);
259
256
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.7.18",
3
+ "version": "0.7.19",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {
@@ -233,7 +233,8 @@ function loadContentUrl(linkRef,fromPageRefresh,fromPopState)
233
233
 
234
234
  //-- for now just load whatever the href prop is (we can add actions to perform specific processing and then load content based on element atts etc)
235
235
  let frontmatterData = {};
236
- fetch("_books/"+linkRef).then(response =>
236
+ let booksLinkRef = linkRef.includes('_books/') ? linkRef : "_books/"+linkRef;
237
+ fetch(booksLinkRef).then(response =>
237
238
  {
238
239
  if(response.headers.has("X-frontmatter"))
239
240
  {