fopp
fopp copied to clipboard
Searching for "turtle.write" returns results where "turtle" and "write" separately
Describe the bug
For example, when I search for turtle.write
in the textbook, it returns pages that include the words turtle
and write
.
To Reproduce Steps to reproduce the behavior:
- Go to Search.
- Type in
turtle.write
or"turtle.write"
- See that the results have the words "turtle" and "write" highlighted separately.
Expected behavior Only pages which include "turtle.write" together (including the dot) should appear.
From looking at the FOPP codebase, the search function that's being implemented is written by 'Sphinx team'. The file is called searchtools.js
located in build/fopp/_static
folder of FOPP. It seems to be generating some kind of search index (Data Structure: List of key value) and is in a file searchindex.js
. The file is located in build/fopp
folder. Couldn't find search files besides in build
folder. There some part in the searchtools.js
file that seems to split in .
.
Also, it seems like the search depends on what words
are indexed? Cannot find my_turtle.up()
as well which is in the textbook. The result for this search is empty.
Now I think, besides searching for words with .
, what all we want to be found with search
functionality.