Skip to content

Commit

Permalink
fix: trim code before highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Apr 20, 2020
1 parent eab6ab5 commit c1ae528
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/modules/components/HighlightedCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit c1ae528

Please sign in to comment.