Skip to content

Commit 43f25a1

Browse files
Update packages/module/patternfly-docs/content/extensions/chatbot/examples/Customizing Messages/Customizing Messages.md
Co-authored-by: Erin Donehoo <[email protected]>
1 parent 49c4270 commit 43f25a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/module/patternfly-docs/content/extensions/chatbot/examples/Customizing Messages/Customizing Messages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The ChatBot extension `<Message>` component transforms Markdown to PatternFly Re
1919

2020
remark parses Markdown as input and serializes Markdown as output, while rehype does the same for HTML. This allows you to target and make transformations at specific checkpoints in the transformation process: either while the text tree is still in Markdown, or while the text tree is in HTML format. For more detailed information on the architecture of this library, see the [react-markdown documentation](https://github.com/remarkjs/react-markdown?tab=readme-ov-file#architecture).
2121

22-
You may need these plugins if, for example, you wanted to change the `href` on a link depending on the link text. The `<Message>` prop `rehypePlugins` will take any custom rehype plugins for the Message component. We use these plugins already within the extension for [rendering images a certain way](https://www.npmjs.com/package/rehype-unwrap-images) and [handling external links](https://www.npmjs.com/package/rehype-external-links). There are many open-source libraries available for other common use cases as well.
22+
You may need these plugins if, for example, you wanted to change the `href` on a link based on the link text. The `<Message>` prop `rehypePlugins` will accept any custom rehype plugins. We use already use these plugins in ChatBot to [render images a certain way](https://www.npmjs.com/package/rehype-unwrap-images) and [handle external links](https://www.npmjs.com/package/rehype-external-links).
2323

2424
If you can't find one for your use case, [Unified](https://unifiedjs.com/) has [a helpful guide](https://unifiedjs.com/learn/guide/create-a-rehype-plugin/) on how to create custom plugins. For a more direct example, if we wanted to change the `href` on links that included the text string `react`, we could write a very basic plugin like this:
2525

0 commit comments

Comments
 (0)