Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 0e94954

Browse files
committed
preserve hash
1 parent 636df4e commit 0e94954

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

sphinx_search/_static/js/rtd_sphinx_search.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ const updateUrl = () => {
8282
let origin = window.location.origin;
8383
let path = window.location.pathname;
8484
let url_params = $.getQueryParameters();
85+
let hash = window.location.hash;
8586

8687
// SEARCH_QUERY should not be an empty string
8788
if (_is_string(SEARCH_QUERY)) {
@@ -90,7 +91,7 @@ const updateUrl = () => {
9091
delete url_params.rtd_search;
9192
}
9293

93-
let window_location_search = convertObjToUrlParams(url_params);
94+
let window_location_search = convertObjToUrlParams(url_params) + hash;
9495

9596
// this happens during the tests,
9697
// when window.location.origin is "null" in Firefox

sphinx_search/_static/js/rtd_sphinx_search.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)