Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #8380: html search: search results are wrapped with <p> instead of <div> #8386

Merged
merged 1 commit into from Nov 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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