Fix: string merge bug about agent TextProcessing. (\m) (#10211)
### What problem does this PR solve? An error occurred while merging strings containing '\m' in the Text Processing function of the agent. Convert \ m to m using regular expressions From my example alone, it doesn't affect the original meaning, it's still math <img width="1227" height="1056" alt="image" src="https://github.com/user-attachments/assets/9306a8ca-bb97-47bf-b91f-77acfce49875" /> ### Type of change - [ √ ] Bug Fix (non-breaking change which fixes an issue) Co-authored-by: mxc <mxc@example.com>
This commit is contained in:
parent
da82566304
commit
46a61e5aff
1 changed files with 2 additions and 0 deletions
|
|
@ -90,6 +90,8 @@ class StringTransform(Message, ABC):
|
||||||
for k,v in kwargs.items():
|
for k,v in kwargs.items():
|
||||||
if not v:
|
if not v:
|
||||||
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, v, script)
|
||||||
|
|
||||||
self.set_output("result", script)
|
self.set_output("result", script)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue