import React from 'react' import cx from 'classnames' import { useTheme } from '@primer/react' import ReactMarkdown from 'react-markdown' import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter' import { vs, vscDarkPlus } from 'react-syntax-highlighter/dist/cjs/styles/prism' import gfm from 'remark-gfm' import { MarkdownContent } from 'components/ui/MarkdownContent' import styles from './ArticleMarkdown.module.scss' type Props = { className?: string children: string } export const ArticleMarkdown = ({ className, children }: Props) => { const theme = useTheme() return ( { const match = /language-(\w+)/.exec(className || '') return !inline && match ? ( ) : ( {children} ) }, }} > {children} ) }