Skip to content

Commit

Permalink
Add explicit markdown parser (#532)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaosPapailiou authored Sep 25, 2024
1 parent f34ac2c commit aa10001
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ def __init__(
handlers={
"application/pdf": PyMuPDFParser(),
"text/plain": TextParser(),
"text/markdown": TextParser(),
"text/html": BS4HTMLParser(),
"application/msword": MsWordParser(),
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": (
Expand Down Expand Up @@ -385,7 +386,7 @@ def lazy_load(
mime_type = mimetypes.guess_type(self.uri)[0]
f = vfs.open(self.uri)

if mime_type is None:
if mime_type is None or mime_type.startswith("text"):
mime_type = "text/plain"

if mime_type.startswith("image/"):
Expand Down

0 comments on commit aa10001

Please sign in to comment.