import styles from './text.module.css' import ReactMarkdown from 'react-markdown' import gfm from 'remark-gfm' import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter' /* Use `…/dist/cjs/…` if you’re not in ESM! */ import { atomDark } from 'react-syntax-highlighter/dist/cjs/styles/prism' export default function Text ({ children }) { return (
, code ({ node, inline, className, children, ...props }) { const match = /language-(\w+)/.exec(className || '') return !inline ? ( {String(children).replace(/\n$/, '')} ) : ( {children} ) } }} remarkPlugins={[gfm]} > {children} ) }