From 339cab76579ee2b9b0c6ed85cdf3f89afe589067 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 8 Nov 2020 17:15:00 +0900 Subject: [PATCH] Fix #8380: html search: search results are wrapped with

instead of

--- CHANGES | 3 +++ sphinx/themes/basic/static/basic.css_t | 2 +- sphinx/themes/basic/static/searchtools.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 208bd27157..3b18e13ec6 100644 --- a/CHANGES +++ b/CHANGES @@ -18,6 +18,8 @@ Incompatible changes * #7784: i18n: The msgid for alt text of image is changed * #7996: manpage: Make a section directory on build manpage by default (see :confval:`man_make_section_directory`) +* #8380: html search: search results are wrapped with ``

`` instead of + ``

`` Deprecated ---------- @@ -43,6 +45,7 @@ Features added Bugs fixed ---------- +* #8380: html search: Paragraphs in search results are not identified as ``

`` * #8342: Emit a warning if a unknown domain is given for directive or role (ex. ``:unknown:doc:``) diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index 38b9fb5539..64fb93fd89 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -130,7 +130,7 @@ ul.search li a { font-weight: bold; } -ul.search li div.context { +ul.search li p.context { color: #888; margin: 2px 0 0 30px; text-align: left; diff --git a/sphinx/themes/basic/static/searchtools.js b/sphinx/themes/basic/static/searchtools.js index 261ecaa928..1a171e0c67 100644 --- a/sphinx/themes/basic/static/searchtools.js +++ b/sphinx/themes/basic/static/searchtools.js @@ -501,7 +501,7 @@ var Search = { var excerpt = ((start > 0) ? '...' : '') + $.trim(text.substr(start, 240)) + ((start + 240 - text.length) ? '...' : ''); - var rv = $('

').text(excerpt); + var rv = $('

').text(excerpt); $.each(hlwords, function() { rv = rv.highlightText(this, 'highlighted'); });