黄腾 aopstudio commited on
Commit
0842c1e
·
1 Parent(s): c330cdb

add support for markdown file in one parse way (#2052)

Browse files

### What problem does this PR solve?

#2021 add support for markdown file in one parse way

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

Co-authored-by: Zhedong Cen <[email protected]>

Files changed (1) hide show
  1. rag/app/one.py +1 -1
rag/app/one.py CHANGED
@@ -80,7 +80,7 @@ def chunk(filename, binary=None, from_page=0, to_page=100000,
80
  excel_parser = ExcelParser()
81
  sections = excel_parser.html(binary, 1000000000)
82
 
83
- elif re.search(r"\.txt$", filename, re.IGNORECASE):
84
  callback(0.1, "Start to parse.")
85
  txt = ""
86
  if binary:
 
80
  excel_parser = ExcelParser()
81
  sections = excel_parser.html(binary, 1000000000)
82
 
83
+ elif re.search(r"\.(txt|md|markdown)$", filename, re.IGNORECASE):
84
  callback(0.1, "Start to parse.")
85
  txt = ""
86
  if binary: