Skip to content

Search: fix parsing of footnotes #9154

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

Merged
merged 1 commit into from
May 2, 2022
Merged

Search: fix parsing of footnotes #9154

merged 1 commit into from
May 2, 2022

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Apr 28, 2022

Our code to detect sphinx domains is a little naive,
sphinx also doesn't make it easy to detect these.
We were removing footnotes in the process of removing domains.

Also de code that extracts domains had a bug,
but looks like we aren't using that as the source of domains, so our domains search wasn't affected by it,
we are using the ones we have in our DB.. so not really sure about why we are parsing them at all :D (maybe this was before we stored the domains in our db?)

found this while testing docutils 18.1

Our code to detect sphinx domains is a little naive,
sphinx also doesn't make it easy to detect these.
@stsewd stsewd requested a review from a team as a code owner April 28, 2022 22:36
Comment on lines +412 to +413
A Sphinx domain is a <dl> tag which contains <dt> tags with an 'id' attribute,
dl tags that have the "footnote" class aren't domains.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent comment! 💯

@stsewd stsewd merged commit 27676b7 into main May 2, 2022
@stsewd stsewd deleted the fix-footnotes-parsing branch May 2, 2022 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants