You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm using pdoc3 with lunr_search, it helps me a lot and produces very nice documentation without much effort, many thanks to the developers.
I just have one problem with it. Search results show found documentation part for both the original class and the classes that inherit it. This is fine and all of them actually link to the same part in the documentation for the original class, but the section parts in the links (the #<section name> parts) actually contain the names of the child classes instead of the parent class that actually contains the documentation which results in not being able to jump to the correct section of the page when clicking on the link (in short, each result with the child class leads to the right page, but it's unable to jump to the right part of it).
The first link is fine and it leads to the correct section of the page.
The second link leads to a non-existing section of the page. The generated link should be the same as the first one.
In this case, the first link leads to the parent class which is fine, but when having a larger project, the parent class is not necessarily at the top of the search results. Also, in this case, the searched method is clearly visible, but if the class has many methods, it requires one additional awkward step of searching again on the page for the method.
If there is no easy fix for this, is there an existing option that would mitigate this, such as showing only the result for the parent class?
The text was updated successfully, but these errors were encountered:
Hello, I'm using pdoc3 with lunr_search, it helps me a lot and produces very nice documentation without much effort, many thanks to the developers.
I just have one problem with it. Search results show found documentation part for both the original class and the classes that inherit it. This is fine and all of them actually link to the same part in the documentation for the original class, but the section parts in the links (the
#<section name>
parts) actually contain the names of the child classes instead of the parent class that actually contains the documentation which results in not being able to jump to the correct section of the page when clicking on the link (in short, each result with the child class leads to the right page, but it's unable to jump to the right part of it).Here is a demonstration:
Structure:
Content of 'class1.py'
Content of 'class2.py'
Creation of html pages:
Opening 'http://localhost:63342/project/docs/module_example/' shows the generated pages for both classes.
When searching for 'get_a', it shows two results
module_example.class1.Class1.get_a()
http://localhost:63342/project/docs/module_example/class1.html#module_example.class1.Class1.get_a
module_example.class2.Class2.get_a()
http://localhost:63342/project/docs/module_example/class1.html#module_example.class2.Class2.get_a
The first link is fine and it leads to the correct section of the page.
The second link leads to a non-existing section of the page. The generated link should be the same as the first one.
In this case, the first link leads to the parent class which is fine, but when having a larger project, the parent class is not necessarily at the top of the search results. Also, in this case, the searched method is clearly visible, but if the class has many methods, it requires one additional awkward step of searching again on the page for the method.
If there is no easy fix for this, is there an existing option that would mitigate this, such as showing only the result for the parent class?
The text was updated successfully, but these errors were encountered: