From e4765ebe0c36642b37f13249dce348ad7fb82440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=85=BE?= <101850389+hangters@users.noreply.github.com> Date: Thu, 22 Aug 2024 15:32:35 +0800 Subject: [PATCH] add support for markdown file in one parse way (#2052) ### 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 --- rag/app/one.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/app/one.py b/rag/app/one.py index 88ca9e376..fe648c71b 100644 --- a/rag/app/one.py +++ b/rag/app/one.py @@ -80,7 +80,7 @@ def chunk(filename, binary=None, from_page=0, to_page=100000, excel_parser = ExcelParser() sections = excel_parser.html(binary, 1000000000) - elif re.search(r"\.txt$", filename, re.IGNORECASE): + elif re.search(r"\.(txt|md|markdown)$", filename, re.IGNORECASE): callback(0.1, "Start to parse.") txt = "" if binary: