Skip to content

Commit 9034dbd

Browse files
authoredApr 6, 2023
Fix types in syntax highlight example
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>
1 parent 298b4f1 commit 9034dbd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -354,14 +354,14 @@ ReactDom.render(
354354
const match = /language-(\w+)/.exec(className || '')
355355
return !inline && match ? (
356356
<SyntaxHighlighter
357+
{...props}
357358
children={String(children).replace(/\n$/, '')}
358359
style={dark}
359360
language={match[1]}
360361
PreTag="div"
361-
{...props}
362362
/>
363363
) : (
364-
<code className={className} {...props}>
364+
<code {...props} className={className}>
365365
{children}
366366
</code>
367367
)

0 commit comments

Comments
 (0)
Please sign in to comment.