diff --git a/docs/src/modules/components/HighlightedCode.js b/docs/src/modules/components/HighlightedCode.js index 62b56acdbdb979..a64efc6a1fe340 100644 --- a/docs/src/modules/components/HighlightedCode.js +++ b/docs/src/modules/components/HighlightedCode.js @@ -6,7 +6,7 @@ import prism from 'docs/src/modules/utils/prism'; export default function HighlightedCode(props) { const { code, language } = props; const renderedCode = React.useMemo(() => { - return prism(code, language); + return prism(code.trim(), language); }, [code, language]); return (