fumadocs-core 13.1.0 → 13.2.0
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/source/index.js +5 -3
- package/dist/toc.js +1 -1
- package/package.json +1 -1
package/dist/source/index.js
CHANGED
|
@@ -352,11 +352,13 @@ function createGetUrl(baseUrl) {
|
|
|
352
352
|
};
|
|
353
353
|
}
|
|
354
354
|
function getSlugs(info) {
|
|
355
|
-
|
|
355
|
+
return [...info.dirname.split("/"), info.name].filter(
|
|
356
356
|
// filter empty folder names and file groups like (group_name)
|
|
357
|
-
(v) =>
|
|
357
|
+
(v, i, arr) => {
|
|
358
|
+
if (v.length === 0) return false;
|
|
359
|
+
return i === arr.length - 1 ? v !== "index" : !/^\(.+\)$/.test(v);
|
|
360
|
+
}
|
|
358
361
|
);
|
|
359
|
-
return result[result.length - 1] === "index" ? result.slice(0, -1) : result;
|
|
360
362
|
}
|
|
361
363
|
function loader(options) {
|
|
362
364
|
return createOutput(options);
|
package/dist/toc.js
CHANGED