diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-06-26 17:19:14 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-06-26 17:19:14 +0300 |
commit | aaa5d7df0c765ee4fc1485861c59297fcdd92c4c (patch) | |
tree | 36798334138bbaa56521f88c43f2ecc6b282e965 | |
parent | 835f72b5ca6161bd15f9056b0e242ea570d75a25 (diff) |
HTML Search: search snipets should not be folded
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | sphinx/themes/basic/static/searchtools.js | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -32,6 +32,7 @@ Bugs fixed ``-``, ``~``, and ``**``). Patch by Adam Turner. * #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 * #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 cdee55dbd..2c934f200 100644 --- a/sphinx/themes/basic/static/searchtools.js +++ b/sphinx/themes/basic/static/searchtools.js @@ -518,7 +518,7 @@ const Search = { let summary = document.createElement("div"); summary.classList.add("context"); - summary.innerText = top + text.substr(startWithContext, 240).trim() + tail; + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; highlightWords.forEach((highlightWord) => _highlightText(summary, highlightWord, "highlighted") |