Skip to content

Commit 0ff3232

Browse files
authored
Merge pull request #8386 from tk0miya/8380_wrap_search_results_with_p
Fix #8380: html search: search results are wrapped with <p> instead of <div>
2 parents 2a26761 + 339cab7 commit 0ff3232

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Incompatible changes
1818
* #7784: i18n: The msgid for alt text of image is changed
1919
* #7996: manpage: Make a section directory on build manpage by default (see
2020
:confval:`man_make_section_directory`)
21+
* #8380: html search: search results are wrapped with ``<p>`` instead of
22+
``<div>``
2123

2224
Deprecated
2325
----------
@@ -43,6 +45,7 @@ Features added
4345
Bugs fixed
4446
----------
4547

48+
* #8380: html search: Paragraphs in search results are not identified as ``<p>``
4649
* #8342: Emit a warning if a unknown domain is given for directive or role (ex.
4750
``:unknown:doc:``)
4851

sphinx/themes/basic/static/basic.css_t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ ul.search li a {
130130
font-weight: bold;
131131
}
132132

133-
ul.search li div.context {
133+
ul.search li p.context {
134134
color: #888;
135135
margin: 2px 0 0 30px;
136136
text-align: left;

sphinx/themes/basic/static/searchtools.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ var Search = {
501501
var excerpt = ((start > 0) ? '...' : '') +
502502
$.trim(text.substr(start, 240)) +
503503
((start + 240 - text.length) ? '...' : '');
504-
var rv = $('<div class="context"></div>').text(excerpt);
504+
var rv = $('<p class="context"></div>').text(excerpt);
505505
$.each(hlwords, function() {
506506
rv = rv.highlightText(this, 'highlighted');
507507
});

0 commit comments

Comments
 (0)