Shaun commited on
Commit
7ccbb61
·
1 Parent(s): b9d91e7

feat: support markdown files (#483)

Browse files

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)

Files changed (1) hide show
  1. rag/app/naive.py +1 -1
rag/app/naive.py CHANGED
@@ -137,7 +137,7 @@ def chunk(filename, binary=None, from_page=0, to_page=100000,
137
  excel_parser = ExcelParser()
138
  sections = [(excel_parser.html(binary), "")]
139
 
140
- elif re.search(r"\.txt$", filename, re.IGNORECASE):
141
  callback(0.1, "Start to parse.")
142
  txt = ""
143
  if binary:
 
137
  excel_parser = ExcelParser()
138
  sections = [(excel_parser.html(binary), "")]
139
 
140
+ elif re.search(r"\.(txt|md)$", filename, re.IGNORECASE):
141
  callback(0.1, "Start to parse.")
142
  txt = ""
143
  if binary: