Skip to content

Commit

Permalink
Merge branch 'fix/mdx-language' into fix/preview-html
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajk committed Mar 3, 2020
2 parents 1f19f89 + 15758b3 commit 0c9bb29
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/styleguide/src/components/MDX/MDX.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ export const MDXComponents = {
a: props => <Link {...props} />,
inlineCode: props => <Code {...props} />,
code: props => (
<CodeBlock language={props.className.replace(/language-/, '')} {...props} />
<CodeBlock
language={props.className && props.className.replace(/language-/, '')}
{...props}
/>
),
};

Expand Down

0 comments on commit 0c9bb29

Please sign in to comment.