This commit is contained in:
simonsan 2021-01-21 14:00:19 +00:00
parent 0898c0f000
commit 6cd4a938a4
4 changed files with 5 additions and 4 deletions

2
.env
View File

@ -1 +1 @@
MDBOOK_VERSION=0.4.5 MDBOOK_VERSION=0.4.6

View File

@ -296,7 +296,7 @@ window.search = window.search || {};
} }
if (url.params.hasOwnProperty(URL_MARK_PARAM)) { if (url.params.hasOwnProperty(URL_MARK_PARAM)) {
var words = url.params[URL_MARK_PARAM].split(' '); var words = decodeURIComponent(url.params[URL_MARK_PARAM]).split(' ');
marker.mark(words, { marker.mark(words, {
exclude: mark_exclude exclude: mark_exclude
}); });
@ -427,6 +427,7 @@ window.search = window.search || {};
delete url.params[URL_MARK_PARAM]; delete url.params[URL_MARK_PARAM];
url.hash = ""; url.hash = "";
} else { } else {
delete url.params[URL_MARK_PARAM];
delete url.params[URL_SEARCH_PARAM]; delete url.params[URL_SEARCH_PARAM];
} }
// A new search will also add a new history item, so the user can go back // A new search will also add a new history item, so the user can go back

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long