mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
update text splitter (#3020)
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
import { simpleMarkdownText } from '@fastgpt/global/common/string/markdown';
|
||||
import { WorkerNameEnum, runWorker } from '../../worker/utils';
|
||||
import { ImageType } from '../../worker/readFile/type';
|
||||
|
||||
export const htmlToMarkdown = async (html?: string | null) => {
|
||||
const md = await runWorker<string>(WorkerNameEnum.htmlStr2Md, { html: html || '' });
|
||||
const md = await runWorker<{
|
||||
rawText: string;
|
||||
imageList: ImageType[];
|
||||
}>(WorkerNameEnum.htmlStr2Md, { html: html || '' });
|
||||
|
||||
return simpleMarkdownText(md);
|
||||
return simpleMarkdownText(md.rawText);
|
||||
};
|
||||
|
Reference in New Issue
Block a user