diff --git a/source/js/search/local-search.js b/source/js/search/local-search.js index 964d7ae..0118ea1 100644 --- a/source/js/search/local-search.js +++ b/source/js/search/local-search.js @@ -64,7 +64,7 @@ var searchFunc = function(path, filter, wrapperId, searchId, contentId) { var dataTitleLowerCase = dataTitle.toLowerCase(); var dataContent = data.content; var dataContentLowerCase = dataContent.toLowerCase(); - var dataUrl = data.path; + var dataUrl = data.path.startsWith('//') ? data.path.slice(1) : data.path; // 避免文章设置永久链接导致点击打开失败 var indexTitle = -1; var indexContent = -1; var firstOccur = -1; @@ -167,4 +167,4 @@ utils.jq(() => { } }); observer.observe($resultArea, { childList: true }); - }); \ No newline at end of file + });