Skip to content

Commit

Permalink
Fixed: selecting document class is sensitive to file extention. Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
mush42 committed Sep 28, 2021
1 parent fc11bf6 commit 3ae2b73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bookworm/document_uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def create_copy(self, format=None, path=None, openner_args=None, view_args=None)
@classmethod
def get_format_by_filename(cls, filename):
"""Get the document format using its filename."""
fileext = Path(filename).suffix.strip(".")
fileext = Path(filename).suffix.strip(".").lower()
if (file_format := cls._get_format_given_extension(f"*.{fileext}")) :
return file_format
possible_exts = tuple(str(filename).split("."))
Expand Down

0 comments on commit 3ae2b73

Please sign in to comment.