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
Search: headings which contain inline code are incomplete when displayed in search results #6132
Comments
Thanks for reporting. We're happy to look into it, but:
Yes, it is necessary. You checked that you carefully read our bug reporting guide, including:
The moment you provide it, we'll look into it. |
9.4.3-inline-code-headings.zip Here it is. I thought I could get away without it as the conditions/example were already present in the documentation but I do realize the configuration isn't minimal. Note to self: "If you take shortcuts, you get cut short." -Gary Busey |
Fixed in 57e598b. This was tricky, so I improved the debugging launch configurations in the process in dcf5a80, 34aad07 and 790a446 |
By the way, the reproduction was perfect for debugging, so many thanks for investing the time into it. Without it, I would have had to create one myself first, since debugging the search on a large index as we have it on our own docs is absolutely impractical. Having a small, concise reproduction for testing made fixing this straight-forward. |
Released as part of 9.4.4. |
Your process for creating the reproduction made it a piece of cake and actually took me less time than my initial screenshots did. Thanks a bunch for the quick fix, much appreciated! |
Context
No response
Bug description
When a heading contains inline code and search terms are contained within the heading itself, only the portions of the heading which matched the terms are displayed to the user, with the rest of the heading being omitted entirely.
The result of this is incomplete information being shown to the user and, depending on the text that's missing, can display confusing and/or factually incorrect results to the user.
Note: If the matched search term(s) are contained in the content beneath the heading only (i.e. not within the heading itself) then the headings are displayed properly.
Related links
Reproduction
While I'm happy to provide this if needed, I don't think it provides any benefit in this particular case as the issue is easily reproducible without any special configuration and easily demonstrable using the official project documentation. In lieu of a reproduction .zip, I took screenshots of the official documentation and took care to ensure that they include the URL and version number in them. As such, these can be used as additional examples of steps of steps to reproduce.
Here are screenshots showing numerous ways the Creating a
.zip
file section in the official project documentation can be displayed depending on the search terms. Section is located on the Creating a reproduction page, coincidentally enough.❌ Search for zip shows only Creating a
.zip
:❌ Searching for file shows only file:
✔ Searching for text beneath shows the full heading properly (Creating a
.zip
file):Here's another example, showing the same behaviour on a page heading (rather than section heading), using the Using
git sparse-checkout
for faster documentation builds page in the official project documentation:❌ Searching for git sp shows only Using git sparse-checkout:
❌ Searching for docum shows only for faster documentation builds:
✔ As with the example above, searching for text beneath it shows the full heading correctly (Using
git sparse-checkout
for faster documentation builds):If you'd still like a reproduction .zip, please just let me know and I'll be happy to provide one.
Steps to reproduce
1. Use inline code in a heading in a markdown file in the documentation.
e.g.
# PLEASE `DO` `NOT` TRY THIS AT HOME!!
2. Perform a search using the built-in search plugin.
A search for home results in: TRY THIS AT HOME:
A search for please results in: PLEASE DO:
(As a side note, I do see that the exclamation marks are missing too but I haven't investigated it well enough yet to be confident it's a bug. )
Browser
No response
Before submitting
The text was updated successfully, but these errors were encountered: