mirror of
https://github.com/labring/FastGPT.git
synced 2026-04-26 02:07:28 +08:00
fix: remove regex match groups (#6531)
This commit is contained in:
@@ -422,7 +422,7 @@ export const replaceJsonBodyString = (
|
||||
continue;
|
||||
}
|
||||
|
||||
const escapedPattern = `\\{\\{\\$(${nodeId.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\.${id.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')})\\$\\}\\}`;
|
||||
const escapedPattern = `\\{\\{\\$${nodeId.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\.${id.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\$\\}\\}`;
|
||||
|
||||
replacements1.push({
|
||||
pattern: escapedPattern,
|
||||
@@ -461,7 +461,7 @@ export const replaceJsonBodyString = (
|
||||
const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
||||
|
||||
replacements2.push({
|
||||
pattern: `{{(${escapedKey})}}`,
|
||||
pattern: `{{${escapedKey}}}`,
|
||||
replacement: formatVal
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user