Skip to content

Commit

Permalink
Merge pull request #8386 from tk0miya/8380_wrap_search_results_with_p
Browse files Browse the repository at this point in the history
Fix #8380: html search: search results are wrapped with <p> instead of <div>
  • Loading branch information
tk0miya committed Nov 12, 2020
2 parents 2a26761 + 339cab7 commit 0ff3232
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Expand Up @@ -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 ``<p>`` instead of
``<div>``

Deprecated
----------
Expand All @@ -43,6 +45,7 @@ Features added
Bugs fixed
----------

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

Expand Down
2 changes: 1 addition & 1 deletion sphinx/themes/basic/static/basic.css_t
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion sphinx/themes/basic/static/searchtools.js
Expand Up @@ -501,7 +501,7 @@ var Search = {
var excerpt = ((start > 0) ? '...' : '') +
$.trim(text.substr(start, 240)) +
((start + 240 - text.length) ? '...' : '');
var rv = $('<div class="context"></div>').text(excerpt);
var rv = $('<p class="context"></div>').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlighted');
});
Expand Down

0 comments on commit 0ff3232

Please sign in to comment.