yuanjiajun commited on
Commit
5134bdd
·
1 Parent(s): be75656
Files changed (1) hide show
  1. src/service/article-service.ts +1 -1
src/service/article-service.ts CHANGED
@@ -40,7 +40,7 @@ export const processArticleServe = async (data: { title: string; content: string
40
  const { title, content, config } = data;
41
 
42
  // 将富文本内容分割成段落数组
43
- const paragraphs = content.split('\n').filter((p) => p.trim() !== '');
44
 
45
  let htmlWithImages = `<h1>${title}</h1>`;
46
 
 
40
  const { title, content, config } = data;
41
 
42
  // 将富文本内容分割成段落数组
43
+ const paragraphs = content.split(/\\n|\n/).filter((p) => p.trim() !== '');
44
 
45
  let htmlWithImages = `<h1>${title}</h1>`;
46