-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add patch for docusaurus-plugin-search-local
- Loading branch information
Showing
3 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
.yarn/patches/docusaurus-plugin-search-local-npm-2.0.1-4a07fbb27a.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/lib/client/theme/SearchModal/SearchResult.jsx b/lib/client/theme/SearchModal/SearchResult.jsx | ||
index bfe22994cc739b48498deedd30ab36957cf566ae..ea26dbf4a6cd8984cdd42f6eb6243faef5be33c9 100644 | ||
--- a/lib/client/theme/SearchModal/SearchResult.jsx | ||
+++ b/lib/client/theme/SearchModal/SearchResult.jsx | ||
@@ -52,7 +52,7 @@ const SearchResult = (props) => { | ||
url += `?${buildDestinationQueryParams(tokens)}`; | ||
} | ||
if (h) { | ||
- url += h; | ||
+ url = h; | ||
} | ||
history.push(url); | ||
onClick(); | ||
diff --git a/lib/client/theme/SearchPage/SearchPage.jsx b/lib/client/theme/SearchPage/SearchPage.jsx | ||
index 1f594dde9a1196c15b26944f57fcc2affcfe6f99..102e690848656a22b3e43696b9ed6297ca2f24f6 100644 | ||
--- a/lib/client/theme/SearchPage/SearchPage.jsx | ||
+++ b/lib/client/theme/SearchPage/SearchPage.jsx | ||
@@ -112,7 +112,7 @@ function SearchResultItem({ searchResult: { document, type, page, tokens, metada | ||
} | ||
return (<article className={styles.searchResultItem}> | ||
<h2> | ||
- <Link to={document.u + (document.h || "")} dangerouslySetInnerHTML={{ | ||
+ <Link to={document.h ? document.h : document.u} dangerouslySetInnerHTML={{ | ||
__html: isContent | ||
? highlight(articleTitle, tokens) | ||
: highlightStemmed(articleTitle, getStemmedPositions(metadata, "t"), tokens, 100), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters