Skip to content

Commit

Permalink
update pre props to mdxv2
Browse files Browse the repository at this point in the history
Signed-off-by: Randy Lau <[email protected]>
  • Loading branch information
randychilau committed Jul 7, 2023
1 parent a5351e7 commit 3590795
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions root-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ import Blockquote from "./src/reusecore/Blockquote";
import BlockquoteAlt from "./src/reusecore/Blockquote/Blockquote-alt-style";

const components = {
pre: ({ children: { props } }) => {
if (props.mdxType === "code") {
pre: ({ children: { props, type } }) => {
if (type === "code") {
return (
<Code
codeString={props.children.trim()}
language={
props.className && props.className.replace("language-", "")
props.className && props.className.replace("language-", "").trim()
}
{...props}
/>
Expand Down

0 comments on commit 3590795

Please sign in to comment.