Skip to content

Commit

Permalink
Merge pull request #4 from microsoft/fixes_for_filesurfer
Browse files Browse the repository at this point in the history
Small fixes for the file surfer.
  • Loading branch information
afourney authored Nov 25, 2024
2 parents 851c7cf + cc0a039 commit b401396
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 b401396

Please sign in to comment.