[fix] search #211
This commit is contained in:
parent
0654b94f89
commit
1a137826f7
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue