Commit 81bfa7d
authored
fix(sidebars): use startsWith to extract basePath instead of split (#1368)
String.split(doc) matched doc as a substring, so outputDir paths like
"docs/test/docspace" with docPath "docs" would split on the second
occurrence of "doc" inside "docspace", producing double slashes or
missing path segments in generated sidebar IDs.
Replacing with startsWith + substring ensures only the exact path prefix
is stripped at a path boundary.
Closes #13051 parent 21e6ede commit 81bfa7d
File tree
1 file changed
+2
-2
lines changed- packages/docusaurus-plugin-openapi-docs/src/sidebars
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
| 134 | + | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
0 commit comments