diff --git a/src/components/MdxComponents/codeBlock.js b/src/components/MdxComponents/codeBlock.js index 9ffdcaa2..63082e1f 100644 --- a/src/components/MdxComponents/codeBlock.js +++ b/src/components/MdxComponents/codeBlock.js @@ -25,12 +25,13 @@ const LoadableComponent = Loadable({ }); /* eslint-disable react/jsx-key */ -const CodeBlock = ({ children: exampleCode, ...props }) => { +const CodeBlock = ({ children: code, ...props }) => { if (props['react-live']) { - return ; + return ; } else { + const lang = props.className ? props.className.split('-')[1] : null; return ( - + {({ className, style, tokens, getLineProps, getTokenProps }) => (
             {cleanTokens(tokens).map((line, i) => {