mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 19:50:55 +08:00
fix: 修復上次更新導致部分用户本地搜索文章鏈接跳轉錯誤的bugs close #375
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-butterfly",
|
"name": "hexo-theme-butterfly",
|
||||||
"version": "3.2.0-b6",
|
"version": "3.2.0-b7",
|
||||||
"description": "A Simple and Card UI Design theme for Hexo",
|
"description": "A Simple and Card UI Design theme for Hexo",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ $(function () {
|
|||||||
return {
|
return {
|
||||||
title: $('title', this).text(),
|
title: $('title', this).text(),
|
||||||
content: $('content', this).text(),
|
content: $('content', this).text(),
|
||||||
url: GLOBAL_CONFIG.root + $('url', this).text()
|
url: $('url', this).text()
|
||||||
}
|
}
|
||||||
}).get()
|
}).get()
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ $(function () {
|
|||||||
}
|
}
|
||||||
let dataTitle = data.title.trim().toLowerCase()
|
let dataTitle = data.title.trim().toLowerCase()
|
||||||
const dataContent = data.content.trim().replace(/<[^>]+>/g, '').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 indexTitle = -1
|
||||||
let indexContent = -1
|
let indexContent = -1
|
||||||
let firstOccur = -1
|
let firstOccur = -1
|
||||||
|
|||||||
Reference in New Issue
Block a user