Skip to content

Commit f41ee5a

Browse files
revert fix 404
1 parent b1df79d commit f41ee5a

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/plugins/search/search.js

-14
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,6 @@ export function genIndex(path, content = '', router, depth) {
9898
slug = router.toURL(path, { id: slugify(escapeHtml(text)) });
9999
}
100100

101-
// fix 404
102-
let pathname = location.pathname;
103-
let flag = false;
104-
while (slug.startsWith('#/../') && pathname.lastIndexOf('/') > 1) {
105-
flag = true;
106-
if (pathname.endsWith('/')) {
107-
pathname = pathname.substring(0, pathname.length - 1);
108-
}
109-
pathname = pathname.substring(0, pathname.lastIndexOf('/'));
110-
111-
slug = '#/' + slug.substring(5);
112-
}
113-
slug = pathname + (flag ? '/' : '') + slug;
114-
115101
if (str) {
116102
title = removeDocsifyIgnoreTag(str);
117103
}

0 commit comments

Comments
 (0)