fix: Remove empty top-level list items in imported HTML content

This commit is contained in:
Tom Moor
2023-05-25 21:34:26 -04:00
parent e9ec31e5b8
commit be3bcebf6b
5 changed files with 39 additions and 15 deletions

View File

@@ -56,7 +56,10 @@ async function fileToMarkdown(content: Buffer | string): Promise<string> {
async function docxToMarkdown(content: Buffer | string): Promise<string> {
if (content instanceof Buffer) {
const { value: html } = await mammoth.convertToHtml({ buffer: content });
const { value: html } = await mammoth.convertToHtml({
buffer: content,
});
return turndownService.turndown(html);
}