Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: qa regex (#1738)

crazywoola994fceece379
diff --git a/api/core/indexing_runner.py b/api/core/indexing_runner.py
index 56c45bfd852..2baecedfd7f 100644
--- a/api/core/indexing_runner.py
+++ b/api/core/indexing_runner.py
@@ -632,8 +632,8 @@ class IndexingRunner:
return text
def format_split_text(self, text):
- regex = r"Q\d+:\s*(.*?)\s*A\d+:\s*([\s\S]*?)(?=Q|$)"
- matches = re.findall(regex, text, re.MULTILINE)
+ regex = r"Q\d+:\s*(.*?)\s*A\d+:\s*([\s\S]*?)(?=Q\d+:|$)"
+ matches = re.findall(regex, text, re.UNICODE)
return [
{