diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-06-26 17:21:29 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-06-26 17:21:29 +0300 |
commit | 81f20f1a6b1276ed8ef6cf797b7d38d99b8b635f (patch) | |
tree | ad3b33ac4afd8264678ea4bc44ac5a7730025304 | |
parent | aaa5d7df0c765ee4fc1485861c59297fcdd92c4c (diff) |
HTML Search: The markers for header links are shown in the search result
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | sphinx/themes/basic/static/searchtools.js | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -33,6 +33,7 @@ Bugs fixed * #10460: logging: Always show node source locations as absolute paths. * HTML Search: HTML tags are displayed as a part of object name * HTML Search: search snipets should not be folded +* HTML Search: The markers for header links are shown in the search result * #10520: HTML Theme: Fix use of sidebar classes in ``agogo.css_t``. * #6679: HTML Theme: Fix inclusion of hidden toctrees in the agogo theme. * #10566: HTML Theme: Fix enable_search_shortcuts does not work diff --git a/sphinx/themes/basic/static/searchtools.js b/sphinx/themes/basic/static/searchtools.js index 2c934f200..c91278e98 100644 --- a/sphinx/themes/basic/static/searchtools.js +++ b/sphinx/themes/basic/static/searchtools.js @@ -158,7 +158,7 @@ const Search = { const htmlElement = document .createRange() .createContextualFragment(htmlString); - _removeChildren(htmlElement.querySelectorAll(".headerlink")); + htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); const docContent = htmlElement.querySelector('[role="main"]'); if (docContent !== undefined) return docContent.textContent; console.warn( |