File tree Expand file tree Collapse file tree
packages/component/src/Utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import {
44 betterLinkDocumentMod ,
55 parseDocumentFragmentFromString ,
6- serializeDocumentFragmentIntoString
6+ serializeDocumentFragmentIntoString ,
7+ stripParagraphContainer
78} from '@msinternal/botframework-webchat-component-better-link' ;
89import { validateProps } from '@msinternal/botframework-webchat-react-valibot' ;
910import { useStyleOptions } from 'botframework-webchat-api/hook.js' ;
@@ -77,7 +78,10 @@ const InlineMarkdown = (props: InlineMarkdownProps) => {
7778 }
7879 } ) ;
7980
80- return { __html : serializeDocumentFragmentIntoString ( documentFragment ) } ;
81+ // TODO: [P*] Instead of <button value="">, it need to be <button data-markdown-href=""> to trigger the CSS.
82+ // TODO: [P*] Remove trailing <p></p>.
83+
84+ return { __html : stripParagraphContainer ( serializeDocumentFragmentIntoString ( documentFragment ) ) } ;
8185 } , [ markdown , references ] ) ;
8286
8387 const handleClick = useCallback (
You can’t perform that action at this time.
0 commit comments