feat(app): support complex title

This commit is contained in:
wellCh4n
2025-02-15 16:48:21 +08:00
parent 115e6b2a71
commit 8aaee2c40c

View File

@ -65,7 +65,7 @@ export const getDocumentsFromLinks = async ({ links }: { links: string[] }) => {
const splittedText = await splitter.splitText(parsedText);
const title = res.data
.toString('utf8')
.match(/<title>(.*?)<\/title>/)?.[1];
.match(/<title.*>(.*?)<\/title>/)?.[1];
const linkDocs = splittedText.map((text) => {
return new Document({