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
HTML Search: omit anchor reference from document titles in the search index. #12047
base: master
Are you sure you want to change the base?
HTML Search: omit anchor reference from document titles in the search index. #12047
Conversation
Note: reStructuredText document titles are implicit; ref: https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#document
…anchor values" This reverts commit d44dc11.
This seems preferable to my solution in #11942, just tested and it has the same results while making the search index smaller. 👍 from me. |
Fine for me (I'm not an expert in that search-related aspect so I'll leave it to you guys). Should I understand that this PR would replace #11942 ? @jayaddison ping me when you want it to be merged |
That's correct. I think there are three things that I don't like about this pull request, in order of priority:
|
I think I'll begin work on a small JavaScript refactor PR to make test coverage easier to add. |
Is it possible to keep a string or is the null type needed? |
If I remember correctly, this conditional needs to be adjusted if we're using empty strings, but otherwise it should be fine. What I would really like is a way to generate the indexes used in the JavaScript tests from the same Python code that builds |
Moved into #12099. |
I'd like to check whether we can get #12102 in place before progressing this pull request further. If that can be added, then I think adding test coverage here will be much easier and more reliable (I'll be able to create a sample Sphinx project that returns duplicate search results, and add test coverage against that). |
(and maybe do the |
Removing the "awaiting review" label until this PR is ready |
Oops, thanks. I forgot about that. |
Conflicts: CHANGES.rst tests/test_search.py
While I think it would be sensible to merge #12102 first (if-and-when that pull request is considered acceptable!), I'm going to remove the blocker label and draft status from this pull request. |
Feature or Bugfix
Purpose
Detail
docutils
nodes.title
nodes into the title index by omitting theirid
that is used as the hyperlink anchor in the special-case of the document title.Relates