Skip to content

Commit

Permalink
Fix #9456: html search: html_copy_source can't control the search sum…
Browse files Browse the repository at this point in the history
…maries

This reverts commit 634b05f.

So far, users can disable showing summary texts via `html_copy_source`
setting.  But this change always show them forcedly.  To keep
compatibility, it should be reverted temporarily.

refs: #9456
  • Loading branch information
tk0miya committed Jul 24, 2021
1 parent 9218ad4 commit ef53dec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -23,6 +23,7 @@ Bugs fixed
with the HEAD of 3.10
* #9490: autodoc: Some objects under ``typing`` module are not displayed well
with the HEAD of 3.10
* #9456: html search: html_copy_source can't control the search summaries
* #9435: linkcheck: Failed to check anchors in github.com

Testing
Expand Down
8 changes: 7 additions & 1 deletion sphinx/themes/basic/static/searchtools.js
Expand Up @@ -276,7 +276,7 @@ var Search = {
setTimeout(function() {
displayNextItem();
}, 5);
} else {
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.ajax({url: requestUrl,
dataType: "text",
complete: function(jqxhr, textstatus) {
Expand All @@ -289,6 +289,12 @@ var Search = {
displayNextItem();
}, 5);
}});
} else {
// no source available, just display title
Search.output.append(listItem);
setTimeout(function() {
displayNextItem();
}, 5);
}
}
// search finished, update title and status message
Expand Down

0 comments on commit ef53dec

Please sign in to comment.