fix(v2): remove line break from end of code blocks (#2371)

This commit is contained in:
Alexey Pyltsyn 2020-03-07 10:28:33 +03:00 committed by GitHub
parent 5904410c3d
commit 6b75aafd5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -80,7 +80,7 @@ export default ({
<Playground
key={mounted}
scope={{...React}}
code={children.trim()}
code={children.replace(/\n$/, '')}
theme={prismTheme}
{...props}
/>
@ -106,7 +106,7 @@ export default ({
{...defaultProps}
key={mounted}
theme={prismTheme}
code={children.trim()}
code={children.replace(/\n$/, '')}
language={language}>
{({className, style, tokens, getLineProps, getTokenProps}) => (
<pre className={classnames(className, styles.codeBlock)}>