Skip to content

Commit b8dd155

Browse files
committed
fix: excludes mobile toc button for search marks, fixes #473
1 parent 401f4d4 commit b8dd155

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docusaurus-search-local/src/client/theme/SearchBar/SearchBar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,9 @@ export default function SearchBar({
341341
const mark = new Mark(root);
342342
mark.unmark();
343343
if (keywords.length !== 0) {
344-
mark.mark(keywords);
344+
mark.mark(keywords, {
345+
exclude: [".theme-doc-toc-mobile > button"],
346+
});
345347
}
346348

347349
// Apply any keywords to the search input so that we can clear marks in case we loaded a page with a highlight in the url

0 commit comments

Comments
 (0)