nHigashiWeseek 1 年之前
父节点
当前提交
5b300ab229
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      packages/markdown-splitter/src/services/markdown-splitter.ts

+ 3 - 3
packages/markdown-splitter/src/services/markdown-splitter.ts

@@ -19,9 +19,9 @@ export type Chunk = {
  * @param label - The label for the content chunk.
  */
 function addContentChunk(chunks: Chunk[], contentBuffer: string[], label: string) {
-  const contentText = contentBuffer.join('\n\n').trimEnd();
-  if (contentText !== '') {
-    chunks.push({ label, text: contentText });
+  const text = contentBuffer.join('\n\n').trimEnd();
+  if (text !== '') {
+    chunks.push({ label, text });
   }
   contentBuffer.length = 0; // Clear the contentBuffer array
 }