mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #10364 from AA-Turner/fix-terms-check
Fix `highlightSearchWords`'s terms check in `doctools.js`
This commit is contained in:
commit
1660b3ebc6
@ -132,7 +132,7 @@ const Documentation = {
|
||||
highlightSearchWords: () => {
|
||||
const highlight =
|
||||
new URLSearchParams(window.location.search).get("highlight") || "";
|
||||
const terms = highlight.toLowerCase().split(/\s+/);
|
||||
const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
|
||||
if (terms.length === 0) return; // nothing to do
|
||||
|
||||
// There should never be more than one element matching "div.body"
|
||||
|
Loading…
Reference in New Issue
Block a user