Skip to content

Commit aa10001

Browse files
Add explicit markdown parser (#532)
1 parent f34ac2c commit aa10001

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apis/python/src/tiledb/vector_search/object_readers/directory_reader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ def __init__(
355355
handlers={
356356
"application/pdf": PyMuPDFParser(),
357357
"text/plain": TextParser(),
358+
"text/markdown": TextParser(),
358359
"text/html": BS4HTMLParser(),
359360
"application/msword": MsWordParser(),
360361
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": (
@@ -385,7 +386,7 @@ def lazy_load(
385386
mime_type = mimetypes.guess_type(self.uri)[0]
386387
f = vfs.open(self.uri)
387388

388-
if mime_type is None:
389+
if mime_type is None or mime_type.startswith("text"):
389390
mime_type = "text/plain"
390391

391392
if mime_type.startswith("image/"):

0 commit comments

Comments
 (0)