Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

feat(backend:files): enable HTML-to-text conversion for all base elements

johaven6352393b0a9d
diff --git a/backend/src/applications/files/utils/doc-textify/adapters/html.ts b/backend/src/applications/files/utils/doc-textify/adapters/html.ts
index df913dac..6e38393e 100644
--- a/backend/src/applications/files/utils/doc-textify/adapters/html.ts
+++ b/backend/src/applications/files/utils/doc-textify/adapters/html.ts
@@ -1,7 +1,7 @@
import fs from 'fs/promises'
import { compile } from 'html-to-text'
-const htmlConverter = compile({ wordwrap: false, preserveNewlines: false })
+const htmlConverter = compile({ wordwrap: false, preserveNewlines: false, baseElements: { selectors: ['*'] } })
export async function parseHtml(filePath: string): Promise<string> {
const content = await fs.readFile(filePath, { encoding: 'utf8' })