Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2022-06-26 17:21:29 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2022-06-26 17:21:29 +0300
commit81f20f1a6b1276ed8ef6cf797b7d38d99b8b635f (patch)
treead3b33ac4afd8264678ea4bc44ac5a7730025304
parentaaa5d7df0c765ee4fc1485861c59297fcdd92c4c (diff)
HTML Search: The markers for header links are shown in the search result
-rw-r--r--CHANGES1
-rw-r--r--sphinx/themes/basic/static/searchtools.js2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 049de5538..9a3c9112f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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(