mirror of
https://github.com/labring/FastGPT.git
synced 2026-04-06 01:04:35 +08:00
12 lines
350 B
TypeScript
12 lines
350 B
TypeScript
import { WorkerNameEnum, runWorker } from '../../worker/utils';
|
|
import { type ImageType } from '../../worker/readFile/type';
|
|
|
|
export const htmlToMarkdown = async (html?: string | null) => {
|
|
const md = await runWorker<{
|
|
rawText: string;
|
|
imageList: ImageType[];
|
|
}>(WorkerNameEnum.htmlStr2Md, { html: html || '' });
|
|
|
|
return md.rawText;
|
|
};
|