From 65a06d62d8d9cf4caed421ef435250118c02ba41 Mon Sep 17 00:00:00 2001 From: zhimeng123 <60221886+zhimeng123@users.noreply.github.com> Date: Tue, 23 Sep 2025 19:59:13 +0800 Subject: [PATCH] Flow text processing bug (#10246) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### What problem does this PR solve? @KevinHuSh Hello, my submission this morning did not fully resolve this issue. After researching the knowledge, I have decided to delete the two lines of regular expression processing that were added this morning. ``` remote 2 line modify 1 line ``` I have mounted the following code in Docker compose and verified that it will no longer report '\ m' errors image [my before pull](https://github.com/infiniflow/ragflow/pull/10211) image Thanks for your code Review ### Type of change - [√ ] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: mxc --- agent/component/string_transform.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/agent/component/string_transform.py b/agent/component/string_transform.py index 83fb5f962..6ef6ba709 100644 --- a/agent/component/string_transform.py +++ b/agent/component/string_transform.py @@ -90,9 +90,7 @@ class StringTransform(Message, ABC): for k,v in kwargs.items(): if not v: v = "" - k = re.sub(r'\\m', 'm', k) - v = re.sub(r'\\m', 'm', v) - script = re.sub(k, v, script) + script = re.sub(k, lambda match: v, script) self.set_output("result", script)