fix: document deploy (#5867)

This commit is contained in:
Archer
2025-11-05 17:05:58 +08:00
committed by GitHub
parent bf33f7af2e
commit 89ca81d1a4
3 changed files with 16 additions and 12 deletions
+12 -2
View File
@@ -63,7 +63,7 @@ const strIsMdTable = (str: string) => {
return true;
};
const markdownTableSplit = (props: SplitProps): SplitResponse => {
let { text = '', chunkSize } = props;
let { text = '', chunkSize, maxSize = defaultMaxChunkSize } = props;
// split by rows
const splitText2Lines = text.split('\n').filter((line) => line.trim());
@@ -93,7 +93,17 @@ ${mdSplitString}
// Over size
if (chunkLength + nextLineLength > chunkSize) {
chunks.push(chunk);
// 单行非常的长,直接分割
if (chunkLength > maxSize) {
const newChunks = commonSplit({
...props,
text: chunk
}).chunks;
chunks.push(...newChunks);
} else {
chunks.push(chunk);
}
chunk = defaultChunk;
}
chunk += `${splitText2Lines[i]}\n`;