mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-31 23:40:39 +02:00
fix(v2): remove line break from end of code blocks (#2371)
This commit is contained in:
parent
5904410c3d
commit
6b75aafd5a
2 changed files with 3 additions and 3 deletions
|
@ -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)}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue