Skip to content

Commit

Permalink
feat: support markdown files (#483)
Browse files Browse the repository at this point in the history
parse markdown files as txt

### What problem does this PR solve?

support markdown files

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
  • Loading branch information
wrfly committed Apr 22, 2024
1 parent b8e58fe commit 11949f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rag/app/naive.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def chunk(filename, binary=None, from_page=0, to_page=100000,
excel_parser = ExcelParser()
sections = [(excel_parser.html(binary), "")]

elif re.search(r"\.txt$", filename, re.IGNORECASE):
elif re.search(r"\.(txt|md)$", filename, re.IGNORECASE):
callback(0.1, "Start to parse.")
txt = ""
if binary:
Expand Down

0 comments on commit 11949f9

Please sign in to comment.