@@ -55,6 +55,12 @@ function parseNewsSheet(sheet, impactBase = 0) {
|
||||
const publishedAt = parsePublishedAt(r[2])
|
||||
if (!publishedAt) continue
|
||||
const body = String(r[1] || '').trim()
|
||||
// 数据源段落间用全角空格连接, 入库前统一转成换行, 保证详情页有段落感
|
||||
.replace(/\u3000+/g, '\n')
|
||||
.replace(/\u00a0/g, ' ')
|
||||
.replace(/[ \t]+\n/g, '\n')
|
||||
.replace(/\n{3,}/g, '\n\n')
|
||||
.trim()
|
||||
out.push({
|
||||
title,
|
||||
summary: body.slice(0, 180),
|
||||
|
||||
Reference in New Issue
Block a user