Update local-search.js (#450)
This commit is contained in:
parent
09d91d06b6
commit
bda705a5f4
|
@ -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 });
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue