pict-docuserve 0.0.20 → 0.0.22

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.
@@ -7631,6 +7631,30 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
7631
7631
  return '#/Home';
7632
7632
  }
7633
7633
 
7634
+ // Bare hash link (e.g. "#fable") — docsify convention for the home/readme page.
7635
+ // Navigate to the first available sidebar entry rather than #/Home, because
7636
+ // on the splash page #/Home is a no-op (already there).
7637
+ if (pHref.match(/^#[^/]/)) {
7638
+ let tmpSidebarGroups = this.pict.AppData.Docuserve.SidebarGroups;
7639
+ if (tmpSidebarGroups) {
7640
+ for (let g = 0; g < tmpSidebarGroups.length; g++) {
7641
+ let tmpModules = tmpSidebarGroups[g].Modules;
7642
+ if (tmpModules) {
7643
+ for (let m = 0; m < tmpModules.length; m++) {
7644
+ if (tmpModules[m].HasDocs && tmpModules[m].Route) {
7645
+ return tmpModules[m].Route;
7646
+ }
7647
+ }
7648
+ }
7649
+ // Group itself may have a route
7650
+ if (tmpSidebarGroups[g].Route) {
7651
+ return tmpSidebarGroups[g].Route;
7652
+ }
7653
+ }
7654
+ }
7655
+ return '#/Home';
7656
+ }
7657
+
7634
7658
  // Strip leading/trailing slashes for parsing
7635
7659
  let tmpPath = pHref.replace(/^\//, '').replace(/\/$/, '');
7636
7660
  if (!tmpPath) {