Skip to content

Commit

Permalink
fix: issue when links inside markdown (paragraph)
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Apr 27, 2021
1 parent d18127d commit 2f11249
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ui/components/src/Markdown/MarkdownComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ export const markdownComponents: MarkdownComponentType = {
code: props => {
return <SyntaxHighlighter {...props} />;
},
p: props =>
props.children?.length === 1 && typeof props.children[0] === 'string' ? (
<p {...props} />
) : (
<div variant="styles.p" {...props} />
),
pre: props => {
const mdxProps = preToCodeBlock(props);
if (!mdxProps) {
Expand Down

0 comments on commit 2f11249

Please sign in to comment.