[fix] search #211

This commit is contained in:
xaoxuu 2022-12-19 21:40:14 +08:00
parent 0654b94f89
commit 1a137826f7
1 changed files with 20 additions and 20 deletions

View File

@ -48,6 +48,7 @@ hexo.extend.generator.register('search_json_generator', function (locals) {
content = content.replace(/<!--\s*node(.*?)\s*-->/g, '$1')
// 不保留内容的标签
content = content.replace(/{%\s*(.*?)\s*%}/g, '')
}
// 注释
content = content.replace(/<!--\s*(.*?)\s*-->/g, '')
// ## 标题
@ -68,7 +69,6 @@ hexo.extend.generator.register('search_json_generator', function (locals) {
content = content.replace(/[\s]{2,} /g, ' ')
// 特殊字符
content = content.replace(/[\r|\n]+/g, '')
}
temp_post.content = content.trim()
}
if (post.tags && post.tags.length > 0) {