From e13f93292ce1a2b1d5ba161fddfe947a1824a2b0 Mon Sep 17 00:00:00 2001 From: Andrew Courtice Date: Mon, 18 Mar 2024 13:25:43 +1000 Subject: [PATCH 1/2] fix(theme): fixed sidebar expand caret showing when no children are present (#3657) --- src/client/theme-default/components/VPSidebarItem.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/theme-default/components/VPSidebarItem.vue b/src/client/theme-default/components/VPSidebarItem.vue index f6c1c316..59782e0d 100644 --- a/src/client/theme-default/components/VPSidebarItem.vue +++ b/src/client/theme-default/components/VPSidebarItem.vue @@ -82,7 +82,7 @@ function onCaretClick() {
Date: Mon, 18 Mar 2024 11:28:38 +0800 Subject: [PATCH 2/2] fix(localSearch): remove empty titles that may appear in search results (#3665) --- src/node/plugins/localSearchPlugin.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node/plugins/localSearchPlugin.ts b/src/node/plugins/localSearchPlugin.ts index e94eafb7..c223c326 100644 --- a/src/node/plugins/localSearchPlugin.ts +++ b/src/node/plugins/localSearchPlugin.ts @@ -235,8 +235,9 @@ function* splitPageIntoSections(html: string) { const anchor = headingResult?.[2] ?? '' const content = result[i + 2] if (!title || !content) continue - const titles = parentTitles.slice(0, level) + let titles = parentTitles.slice(0, level) titles[level] = title + titles = titles.filter(Boolean) yield { anchor, titles, text: getSearchableText(content) } if (level === 0) { parentTitles = [title]