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: code indentation lost in search index #6104
Comments
Thanks for reporting. We'll look into it. Regarding reproductions, our bug reporting guide explains why we need them:
Minimal reproductions make our life easier, allowing us to fix bugs quicker. Thank you for providing one. |
So, in fact, all indentation is currently lost for code blocks in search – not all in admonitions. We'll look into it. |
Bisection leads to the insight that the error was introduced between 9.0.2 and 9.0.3, specifically in 81e7b8c. |
Fixed in 8299f1d. The whitespace collapsing logic was triggering the problem. |
Released as part of 9.4.3. |
Context
No response
Bug description
If a code block is contained in an admonition, when this code block comes up in the search result, any indentation is lost.
Related links
Reproduction
9.4.2-test.zip
Steps to reproduce
The easier way: Searching for
slugify
in the official documentation, and look for this result:The (entirely unnecessarily) more complex way: Using the supplied ZIP, search for
test
and see how the two results differ.index.md
is unaffected whiletest.md
is broken (in the search results).Browser
Browser-agnostic
Before submitting
The text was updated successfully, but these errors were encountered: