mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
Bugfix/Remove Markdown in Condition (#4761)
Feature/Add remove-markdown dependency and integrate into Condition node for text processing - Added `remove-markdown` package to `packages/components/package.json`. - Integrated `removeMarkdown` function in `Condition.ts` to sanitize string inputs by removing markdown formatting.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { CommonType, ICommonObject, ICondition, INode, INodeData, INodeOutputsValue, INodeParams } from '../../../src/Interface'
|
||||
import removeMarkdown from 'remove-markdown'
|
||||
|
||||
class Condition_Agentflow implements INode {
|
||||
label: string
|
||||
@@ -300,8 +301,8 @@ class Condition_Agentflow implements INode {
|
||||
value2 = parseFloat(_value2 as string) || 0
|
||||
break
|
||||
default: // string
|
||||
value1 = _value1 as string
|
||||
value2 = _value2 as string
|
||||
value1 = removeMarkdown((_value1 as string) || '')
|
||||
value2 = removeMarkdown((_value2 as string) || '')
|
||||
}
|
||||
|
||||
const compareOperationResult = compareOperationFunctions[operation](value1, value2)
|
||||
|
||||
Reference in New Issue
Block a user