From 20a85d553a837adfe2162a90dcf252c057bed301 Mon Sep 17 00:00:00 2001 From: Adam Fourney Date: Fri, 28 Feb 2025 07:41:47 -0800 Subject: [PATCH] Make sure extensions are unique in MarkItDown's convert methods. --- packages/markitdown/src/markitdown/_markitdown.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/markitdown/src/markitdown/_markitdown.py b/packages/markitdown/src/markitdown/_markitdown.py index 7c8d006..51f5c33 100644 --- a/packages/markitdown/src/markitdown/_markitdown.py +++ b/packages/markitdown/src/markitdown/_markitdown.py @@ -381,7 +381,8 @@ class MarkItDown: ext = ext.strip() if ext == "": return - # if ext not in extensions: + if ext in extensions: + return extensions.append(ext) def _guess_ext_magic(self, path):