11/* eslint-disable react/require-default-props */
22
33import { singleToArray } from '@msinternal/botframework-webchat-base/utils' ;
4- import {
5- parseDocumentFragmentFromString ,
6- serializeDocumentFragmentIntoString ,
7- stripParagraphContainer
8- } from '@msinternal/botframework-webchat-component-better-link' ;
94import { useMemoIterable } from '@msinternal/botframework-webchat-react-hooks' ;
105import {
116 Composer as APIComposer ,
@@ -29,7 +24,6 @@ import { DecoratorComposer, type DecoratorMiddleware } from 'botframework-webcha
2924import { type LegacyActivityMiddleware , type Polymiddleware } from 'botframework-webchat-api/middleware.js' ;
3025import { StoreDebugAPIRegistry , type StoreDebugAPI } from 'botframework-webchat-core/internal.js' ;
3126import classNames from 'classnames' ;
32- import { micromark } from 'micromark' ;
3327import PropTypes from 'prop-types' ;
3428import React , { memo , useCallback , useEffect , useMemo , useRef , useState , type ReactNode } from 'react' ;
3529import { Composer as SayComposer } from 'react-say' ;
@@ -70,7 +64,6 @@ import CSSCustomPropertiesContainer from './Styles/CSSCustomPropertiesContainer'
7064import ComponentStylesheet from './stylesheet/ComponentStylesheet' ;
7165import { type ContextOf } from './types/ContextOf' ;
7266import { type FocusTranscriptInit } from './types/internal/FocusTranscriptInit' ;
73- import addTargetBlankToHyperlinks from './Utils/addTargetBlankToHyperlinks' ;
7467import downscaleImageToDataURL from './Utils/downscaleImageToDataURL' ;
7568import mapMap from './Utils/mapMap' ;
7669
@@ -196,19 +189,6 @@ const ComposerCore = ({
196189 const scrollToCallbacksRef = useRef ( [ ] ) ;
197190 const scrollToEndCallbacksRef = useRef ( [ ] ) ;
198191
199- const internalRenderMarkdownInline = useMemo (
200- ( ) => markdown => {
201- const documentFragment = parseDocumentFragmentFromString ( micromark ( markdown ) ) ;
202-
203- addTargetBlankToHyperlinks ( documentFragment ) ;
204-
205- const html = serializeDocumentFragmentIntoString ( documentFragment ) ;
206-
207- return stripParagraphContainer ( html ) ;
208- } ,
209- [ ]
210- ) ;
211-
212192 const styleToEmotionObject = useStyleToEmotionObject ( ) ;
213193
214194 const patchedStyleSet = useMemo (
@@ -293,7 +273,6 @@ const ComposerCore = ({
293273 dispatchScrollPosition,
294274 dispatchTranscriptFocusByActivityKey,
295275 focusTranscriptCallbacksRef,
296- internalRenderMarkdownInline,
297276 nonce,
298277 numTranscriptFocusObservers,
299278 observeScrollPosition,
@@ -311,7 +290,6 @@ const ComposerCore = ({
311290 dispatchScrollPosition ,
312291 dispatchTranscriptFocusByActivityKey ,
313292 focusTranscriptCallbacksRef ,
314- internalRenderMarkdownInline ,
315293 nonce ,
316294 numTranscriptFocusObservers ,
317295 observeScrollPosition ,
0 commit comments