Fixed extensions getting randomized.
This commit is contained in:
parent
d565e77592
commit
adf87dbe9f
1 changed files with 2 additions and 2 deletions
|
|
@ -1701,8 +1701,6 @@ class MarkItDown:
|
|||
def _convert(
|
||||
self, local_path: str, extensions: List[Union[str, None]], **kwargs
|
||||
) -> DocumentConverterResult:
|
||||
# Deduplicate the list of extensions
|
||||
extensions = list(set(extensions))
|
||||
|
||||
error_trace = ""
|
||||
for ext in extensions + [None]: # Try last with no extension
|
||||
|
|
@ -1766,6 +1764,8 @@ class MarkItDown:
|
|||
ext = ext.strip()
|
||||
if ext == "":
|
||||
return
|
||||
if ext in extensions:
|
||||
return
|
||||
# if ext not in extensions:
|
||||
extensions.append(ext)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue