mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-12 22:17:06 +08:00
fix: 修復上次更新導致部分用户本地搜索文章鏈接跳轉錯誤的bugs close #375
This commit is contained in:
@@ -62,7 +62,7 @@ $(function () {
|
||||
return {
|
||||
title: $('title', this).text(),
|
||||
content: $('content', this).text(),
|
||||
url: GLOBAL_CONFIG.root + $('url', this).text()
|
||||
url: $('url', this).text()
|
||||
}
|
||||
}).get()
|
||||
|
||||
@@ -85,7 +85,7 @@ $(function () {
|
||||
}
|
||||
let dataTitle = data.title.trim().toLowerCase()
|
||||
const dataContent = data.content.trim().replace(/<[^>]+>/g, '').toLowerCase()
|
||||
const dataUrl = data.url
|
||||
const dataUrl = data.url.startsWith('/') ? data.url : GLOBAL_CONFIG.root + data.url
|
||||
let indexTitle = -1
|
||||
let indexContent = -1
|
||||
let firstOccur = -1
|
||||
|
||||
Reference in New Issue
Block a user