Skip to content

Commit 954ab3b

Browse files
Add explicit markdown parser for DirectoryTextReader (#566)
1 parent 99caf19 commit 954ab3b

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ def __init__(
367367
handlers={
368368
"application/pdf": PyMuPDFParser(),
369369
"text/plain": TextParser(),
370+
"text/markdown": TextParser(),
370371
"text/html": BS4HTMLParser(),
371372
"application/msword": MsWordParser(),
372373
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": (
@@ -397,7 +398,7 @@ def lazy_load(
397398
mime_type = mimetypes.guess_type(self.uri)[0]
398399
f = vfs.open(self.uri)
399400

400-
if mime_type is None:
401+
if mime_type is None or mime_type.startswith("text"):
401402
mime_type = "text/plain"
402403

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

0 commit comments

Comments
 (0)