From 6fa11ebc2e54ca7954e36297ce6e1d409c1e8ea6 Mon Sep 17 00:00:00 2001 From: taranvohra Date: Thu, 3 Oct 2024 15:06:57 +0530 Subject: [PATCH] wip --- packages/gitbook/src/lib/pages.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/gitbook/src/lib/pages.ts b/packages/gitbook/src/lib/pages.ts index 764a4f0e5..97f8cd88e 100644 --- a/packages/gitbook/src/lib/pages.ts +++ b/packages/gitbook/src/lib/pages.ts @@ -19,6 +19,10 @@ export function resolvePagePath( } if (page.path !== pagePath) { + if (page.path.split('/').join('/') === pagePath) { + return resolvePageDocument(page, ancestors); + } + // TODO: can be optimized to count the number of slashes and skip the entire subtree const result = iteratePages(page.pages, [...ancestors, page]); if (result) {