Skip to content
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

Broken search results for internal includes #2369

Closed
ivankravets opened this issue Mar 5, 2016 · 5 comments
Closed

Broken search results for internal includes #2369

ivankravets opened this issue Mar 5, 2016 · 5 comments
Labels
html search type:enhancement enhance or introduce a new feature

Comments

@ivankravets
Copy link

Description of problem

We have received report from our @platformio community that search result for the some pages are broken in our documentation. I tried to look into the source code and found that issue is related with the documents which have internal .. include::.

Steps to Reproduce

  1. Open our documentation: http://docs.platformio.org
  2. Enter into search form OTA
  3. Borken results: http://docs.platformio.org/en/latest/search.html?q=OTA&check_keywords=yes&area=default#

Actual Results

We see 2 broken results with "copyrights" content. Affected RAW files:

Expected Results

Results should contain matched text according to the search query.

@tk0miya
Copy link
Member

tk0miya commented Mar 6, 2016

What did you mean "broken"?
It looks fine for me. each documents includes the keyword OTA.

@ivankravets
Copy link
Author

Take a look at the search results

screen shot 2016-03-06 at 13 02 07

Here are results from the pages which not contain internal .. include::
http://docs.platformio.org/en/latest/search.html?q=MBED+&check_keywords=yes&area=default
screen shot 2016-03-06 at 13 03 32

@ivankravets
Copy link
Author

It looks fine for me. each documents includes the keyword OTA.

Hm... Could you provide me the search output where do you see "OTA"? Thanks.

@tk0miya
Copy link
Member

tk0miya commented Mar 8, 2016

Thank you for explanation. I understand what you said "broken".
Indeed, it does not work well.

At this present, Sphinx uses the source file (*.rst) to display contents around the keyword. So it fails to highlight the keywords if the keyword does not exist in the document directly.
it might be happen when the document is generated by autodoc extension.

I think big change is needed to fix this. It might be generate another text file to show contents around the keyword.

@tk0miya tk0miya added the type:enhancement enhance or introduce a new feature label Mar 8, 2016
@TimKam
Copy link
Member

TimKam commented Dec 26, 2018

With #1618, Sphinx is getting the search preview snippets from the HTML files. We can expect this issue to be fixed once 2.0 is released. I will close this issue now.

@TimKam TimKam closed this as completed Dec 26, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
html search type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

4 participants
@tk0miya @ivankravets @TimKam and others