Skip to content

Python tool for converting files and office documents to Markdown.

Make sure extensions are unique in MarkItDown's convert methods. (#1076)

afourney9a19fdd134b4
diff --git a/packages/markitdown/src/markitdown/_markitdown.py b/packages/markitdown/src/markitdown/_markitdown.py
index 7c8d006c..51f5c335 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):