evaera / moonwave

Moonwave is a tool for generating documentation from comments in Lua source code.
https://eryn.io/moonwave/
Mozilla Public License 2.0
153 stars 23 forks source link

Middle-clicking search results pre-appends an extra path to URL #116

Closed Ukendio closed 1 year ago

Ukendio commented 2 years ago

Reproduction Steps

  1. Go to the API page of any Moonwave generated documentation site.
  2. Type something into the search bar / navigation.
  3. Middle-click any of the found results.

Expected behaviour

I expect it to take me to the relevant sections.

Actual behaviour

Takes me to a page that isn't found.

image

this issue persists in every doc that was moonwave generated such as:

  1. Matter
  2. ClientCast
  3. RbxUtil
hello-42 commented 2 years ago

Except for the home page of a moonwave site, the bug appears to be indifferent to what section of a site it's on. For instance, the issue occurs on the page generated from Matter's WhyECS.md [page link]:

image producing the non-existent page at: image

Another example from: image image becomes: image

It appears that the results of the search are simply appended to the end of the URL, where the search results are inserted recursively. It was noted that, through some surface-level digging, the issue may be found in the SearchBar's DocSearch.js file.

evaera commented 2 years ago

This is a bug in our dependency https://github.com/praveenn77/docusaurus-lunr-search, they don't seem to have an open issue for this though