Skip to content

Commit

Permalink
Small fixes for the filesurfer.
Browse files Browse the repository at this point in the history
  • Loading branch information
afourney committed Nov 25, 2024
1 parent 851c7cf commit cc0a039
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/markitdown/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
#
# SPDX-License-Identifier: MIT

from ._markitdown import MarkItDown
from ._markitdown import MarkItDown, FileConversionException, UnsupportedFormatException

__all__ = [
"MarkItDown",
"FileConversionException",
"UnsupportedFormatException",
]
5 changes: 3 additions & 2 deletions src/markitdown/_markitdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,8 @@ def convert_response(
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)
Expand Down Expand Up @@ -1093,7 +1094,7 @@ def _guess_ext_magic(self, path):
pass
except PermissionError:
pass
return None
return []

def register_page_converter(self, converter: DocumentConverter) -> None:
"""Register a page text converter."""
Expand Down

0 comments on commit cc0a039

Please sign in to comment.