executablebooks / sphinx-book-theme

A clean book theme for scientific explanations and documentation with Sphinx
https://sphinx-book-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
439 stars 201 forks source link

Issue on page /search.html #855

Open stefanodavid opened 2 months ago

stefanodavid commented 2 months ago

Hi there, I think I have discovered a bug in the rendering of the results of a search. Whenever a search result is the title of a page (or content near the top of the page), some HTML code is shown. Please refer to the screenshot, which comes from the theme's docs, and look at the highlighted result.

search

In tests on my code, the HTML code shown varies (see screenshots below): most of the time it is the one of the “Hide Search Matches” button, in other cases, like also in the above screenshot, it is one or more of the buttons on the top right corner.

search3 search2

I am confident this is a bug in sphinx-book-theme because a search on pydata-sphinx-theme does not show this behaviour. I can not, however, tell if this is a recent or long-standing behaviour. My venv on Debian Trixie, python 3.12 contains the following relevant packages:

docutils==0.20.1
pydata-sphinx-theme==0.15.4
Pygments==2.18.0
Sphinx==7.2.6
sphinx-book-theme==1.1.3
sphinx_design==0.6.1

I am not sure if I need to report other details about my environment or setup, but I will be more than happy to provide any other information that can help you nail down the problem.