Skip to content

Commit

Permalink
Fix sonar code smell
Browse files Browse the repository at this point in the history
  • Loading branch information
imagoiq committed Sep 6, 2023
1 parent 6e5c0d0 commit 0315e0a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const CodeOrSourceMdx = ({ className, children, ...rest }) => {
// markdown-to-jsx does not add className to inline code
if (
typeof className !== 'string' &&
(typeof children !== 'string' || !(children as string).match(/[\n\r]/g))
(typeof children !== 'string' || !children.match(/[\n\r]/g))
) {
return <Code>{children}</Code>;
}
Expand Down

0 comments on commit 0315e0a

Please sign in to comment.