From 9a19fdd134b4de99ffbba6d50fd7848df6a6c50a Mon Sep 17 00:00:00 2001 From: afourney Date: Fri, 28 Feb 2025 07:43:03 -0800 Subject: [PATCH] Make sure extensions are unique in MarkItDown's convert methods. (#1076) --- 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):