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 <[email protected]>
Reviewed-by: Christian Murphy <[email protected]>
Reviewed-by: Titus Wormer <[email protected]>
  • Loading branch information
dlqqq authored 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
Original file line number Diff line number Diff line change
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.