-
Notifications
You must be signed in to change notification settings - Fork 2k
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
No highlighting on search result page #11955
Comments
|
Info updated
No plugin used, all doc files written in RST.
|
I think the highlighting is a seperate issue of some kind: I can also reproduce it with the readthedocs theme and a fairly recent version of Sphinx, as the author suggests. However highlighting seems to work locally with Sphinx when I built it itself (as @madjxatw noticed). I'd investigate more but I'm out of time for a few weeks. 😞 I think the issues reported later with the search summaries being off is a duplicate of #11943 |
I see. For now, I'll keep this one open since I'm not sure whether they are all related or not. It doesn't hurt to have duplicates for this kind of issues because it's hard to identify the real problem. @madjxatw I don't work on the search engine generally, and I plan to first fix the Windows test this w-e, so I'm not sure anyone will be able to help with this before some time. When I've got time, I may try to fix this one or whatever search-related issues it remains. |
Update: Highlighting was fixed by #10930, 7.2.0+ should have it. Pretty sure we can close this ticket. |
So the issue of "not all matched items displayed on the result page" has nothing to do with the highlighting feature itself, right? I have Python 3.8 on the machine in my office and for some reason me and our team must stick to 3.8, but Sphinx 7.2.0+ requires Python 3.9+. Will the highlighting fix be ported to old versions of Sphinx? If not, it would be a bit troublesome to integrate the docs into the project what depends on Python 3.8. |
Unfortunately, we don't do backports and since we dropped Python 3.8 support, some code might not work, especially the code related to typing. Alternatively, you could use Python 3.9 to generate the docs but I'm not sure that it will "correctly" work since we are doing dynamic analysis and not static analysis.
Probably. I am not an expert in that area. But the matched item issue might be related to #11959 or #11955. As such, I'll be closing this issue (since it was about highlighting) but feel free to comment on either of the other two for the "multiple matched issue" (or open a fresh one if you think it's not related to). |
Describe the bug
When a search is done, none of the matched words is highlighted on the search result page. Additionally, only the
h1
heading of the target page where the matched word is found is displayed in the preview, although the matched word more precisely belongs to a section started by a sub heading (e.g. ah2
heading).Look at the following screenshots:
The result of searching
uniform
, the matched word is found, summary is shown, butuniform
does not get highlighted in the summary.Clicking
Linking
to open the target page, you can see thatuniform
is actually located in a paragraph under theh2
headingLibrary naming
. But in the search result page as shown above, theh2
heading is not shown so that the browser is not able to automatically scroll to the line containing matched word in the target page.I've also tested several other themes like
alabaster
,sphinx-book-theme
, etc, these issues persist.How to Reproduce
What in the docs
Only two files, i.e.
index.md
andlinking.md
.The content of my
conf.py
Operations
python3 -m http.server -b 127.0.0.1 -d _buildf/html
http://127.0.0.1:8000
in a web browser (chromium-based)uniform
in the search boxEnvironment Information
Sphinx extensions
Additional context
No response
The text was updated successfully, but these errors were encountered: