Skip to content

Commit 17a553c

Browse files
committed
Add TODO
1 parent f68ac51 commit 17a553c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

packages/component/src/Utils/InlineMarkdown.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import {
44
betterLinkDocumentMod,
55
parseDocumentFragmentFromString,
6-
serializeDocumentFragmentIntoString
6+
serializeDocumentFragmentIntoString,
7+
stripParagraphContainer
78
} from '@msinternal/botframework-webchat-component-better-link';
89
import { validateProps } from '@msinternal/botframework-webchat-react-valibot';
910
import { 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(

0 commit comments

Comments
 (0)