Skip to content

Commit

Permalink
Trim code (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
karlhorky authored and johno committed Jul 15, 2019
1 parent a2ad2b2 commit 00ca408
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/syntax-highlighting/src/components/CodeBlock.js
Expand Up @@ -30,7 +30,7 @@ export default ({children, className, live, render}) => {
}

return (
<Highlight {...defaultProps} code={children} language={language}>
<Highlight {...defaultProps} code={children.trim()} language={language}>
{({className, style, tokens, getLineProps, getTokenProps}) => (
<pre className={className} style={{...style, padding: '20px'}}>
{tokens.map((line, i) => (
Expand Down

1 comment on commit 00ca408

@vercel
Copy link

@vercel vercel bot commented on 00ca408 Jul 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.