mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-13 05:19:00 +08:00
fix: var highlight problme (#214)
This commit is contained in:
parent
66782ef19c
commit
17a1c05728
@ -56,10 +56,11 @@ const OpeningStatement: FC<IOpeningStatementProps> = ({
|
|||||||
}, [value])
|
}, [value])
|
||||||
|
|
||||||
const coloredContent = (tempValue || '')
|
const coloredContent = (tempValue || '')
|
||||||
.replace(regex, varHighlightHTML({ name: '$1' })) // `<span class="${highLightClassName}">{{$1}}</span>`
|
|
||||||
.replace(/\n/g, '<br />')
|
|
||||||
.replace(/</g, '<')
|
.replace(/</g, '<')
|
||||||
.replace(/>/g, '>')
|
.replace(/>/g, '>')
|
||||||
|
.replace(regex, varHighlightHTML({ name: '$1' })) // `<span class="${highLightClassName}">{{$1}}</span>`
|
||||||
|
.replace(/\n/g, '<br />')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const handleEdit = () => {
|
const handleEdit = () => {
|
||||||
|
@ -68,10 +68,11 @@ const BlockInput: FC<IBlockInputProps> = ({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const coloredContent = (currentValue || '')
|
const coloredContent = (currentValue || '')
|
||||||
.replace(regex, varHighlightHTML({ name: '$1' })) // `<span class="${highLightClassName}">{{$1}}</span>`
|
|
||||||
.replace(/\n/g, '<br />')
|
|
||||||
.replace(/</g, '<')
|
.replace(/</g, '<')
|
||||||
.replace(/>/g, '>')
|
.replace(/>/g, '>')
|
||||||
|
.replace(regex, varHighlightHTML({ name: '$1' })) // `<span class="${highLightClassName}">{{$1}}</span>`
|
||||||
|
.replace(/\n/g, '<br />')
|
||||||
|
|
||||||
|
|
||||||
// Not use useCallback. That will cause out callback get old data.
|
// Not use useCallback. That will cause out callback get old data.
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user