docusaurus-plugin-typedoc 1.0.3 → 1.0.5

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/dist/sidebar.js CHANGED
@@ -7,9 +7,10 @@ function getSidebar(navigation, basePath, numberPrefixParser) {
7
7
  .filter((navItem) => Boolean(navItem));
8
8
  }
9
9
  function getNavigationItem(navigationItem, basePath, numberPrefixParser) {
10
+ const navigationItemPath = navigationItem.path || navigationItem.url;
10
11
  const parsedUrl = numberPrefixParser === false
11
- ? navigationItem.path
12
- : navigationItem.path?.replace(/\d+\-/g, '');
12
+ ? navigationItemPath
13
+ : navigationItemPath?.replace(/\d+\-/g, '');
13
14
  const getId = () => {
14
15
  const idParts = [];
15
16
  if (basePath.length > 0) {
@@ -18,7 +19,7 @@ function getNavigationItem(navigationItem, basePath, numberPrefixParser) {
18
19
  if (parsedUrl) {
19
20
  idParts.push(parsedUrl.replace(/\\/g, '/'));
20
21
  }
21
- if (navigationItem.path) {
22
+ if (navigationItemPath) {
22
23
  return idParts.join('/').replace(/(.*)\.\w+$/, '$1');
23
24
  }
24
25
  return null;
@@ -50,5 +50,5 @@ function adjustBaseDirectory(originalPath, subPath) {
50
50
  if (newPath.startsWith(path.sep)) {
51
51
  newPath = newPath.slice(1);
52
52
  }
53
- return newPath;
53
+ return newPath.replace(/\\/g, '/');
54
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docusaurus-plugin-typedoc",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "A Docusaurus plugin to integrate TypeDoc ( + typedoc-plugin-markdown ) into a Docusaurus project.",
5
5
  "main": "dist/index.js",
6
6
  "files": [