Skip to content

Commit

Permalink
Fix types in syntax highlight example
Browse files Browse the repository at this point in the history
Closes GH-736.

Reviewed-by: Remco Haszing <remcohaszing@gmail.com>
Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>
Reviewed-by: Titus Wormer <tituswormer@gmail.com>
  • Loading branch information
dlqqq committed Apr 6, 2023
1 parent 298b4f1 commit 9034dbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readme.md
Expand Up @@ -354,14 +354,14 @@ ReactDom.render(
const match = /language-(\w+)/.exec(className || '')
return !inline && match ? (
<SyntaxHighlighter
{...props}
children={String(children).replace(/\n$/, '')}
style={dark}
language={match[1]}
PreTag="div"
{...props}
/>
) : (
<code className={className} {...props}>
<code {...props} className={className}>
{children}
</code>
)
Expand Down

0 comments on commit 9034dbd

Please sign in to comment.