Explorar el Código

fix: var highlight problme (#214)

tags/0.3.1
Joel hace 2 años
padre
commit
17a1c05728
No account linked to committer's email address

+ 3
- 2
web/app/components/app/configuration/features/chat-group/opening-statement/index.tsx Ver fichero

@@ -56,10 +56,11 @@ const OpeningStatement: FC<IOpeningStatementProps> = ({
}, [value])

const coloredContent = (tempValue || '')
.replace(regex, varHighlightHTML({ name: '$1' })) // `<span class="${highLightClassName}">{{$1}}</span>`
.replace(/\n/g, '<br />')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(regex, varHighlightHTML({ name: '$1' })) // `<span class="${highLightClassName}">{{$1}}</span>`
.replace(/\n/g, '<br />')


const handleEdit = () => {

+ 3
- 2
web/app/components/base/block-input/index.tsx Ver fichero

@@ -68,10 +68,11 @@ const BlockInput: FC<IBlockInputProps> = ({
})

const coloredContent = (currentValue || '')
.replace(regex, varHighlightHTML({ name: '$1' })) // `<span class="${highLightClassName}">{{$1}}</span>`
.replace(/\n/g, '<br />')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.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.
const handleSubmit = () => {

Cargando…
Cancelar
Guardar