Skip to content

Python tool for converting files and office documents to Markdown.

Small fixes for the filesurfer.

Adam Fourneycc0a039bb06c
diff --git a/src/markitdown/__init__.py b/src/markitdown/__init__.py
index 81ab8424..482f4281 100644
--- a/src/markitdown/__init__.py
+++ b/src/markitdown/__init__.py
@@ -2,8 +2,10 @@
#
# SPDX-License-Identifier: MIT
-from ._markitdown import MarkItDown
+from ._markitdown import MarkItDown, FileConversionException, UnsupportedFormatException
__all__ = [
"MarkItDown",
+ "FileConversionException",
+ "UnsupportedFormatException",
]
diff --git a/src/markitdown/_markitdown.py b/src/markitdown/_markitdown.py
index a0c479e9..96997cf3 100644
--- a/src/markitdown/_markitdown.py
+++ b/src/markitdown/_markitdown.py
@@ -999,7 +999,8 @@ class MarkItDown:
fh.close()
# Use puremagic to check for more extension options
- self._append_ext(extensions, self._guess_ext_magic(temp_path))
+ for g in self._guess_ext_magic(temp_path):
+ self._append_ext(extensions, g)
# Convert
result = self._convert(temp_path, extensions, url=response.url)
@@ -1093,7 +1094,7 @@ class MarkItDown:
pass
except PermissionError:
pass
- return None
+ return []
def register_page_converter(self, converter: DocumentConverter) -> None:
"""Register a page text converter."""