feat: 合并

This commit is contained in:
Archer
2023-03-10 03:02:46 +08:00
12 changed files with 5249 additions and 1230 deletions

View File

@@ -356,7 +356,7 @@
line-height: 1.6;
letter-spacing: 0.5px;
text-align: justify;
word-break: break-all;
pre {
display: block;
width: 100%;
@@ -369,7 +369,7 @@
}
pre code {
background-color: #222;
background-color: #222 !important;
color: #fff;
width: 100%;
font-family: 'Söhne,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Helvetica Neue,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji';

View File

@@ -26,8 +26,8 @@ const Markdown = ({ source, isChatting }: { source: string; isChatting: boolean
code({ node, inline, className, children, ...props }) {
const match = /language-(\w+)/.exec(className || '');
const code = String(children).replace(/\n$/, '');
return !inline ? (
<Box my={3} borderRadius={'md'} overflow={'hidden'}>
return !inline || match ? (
<Box my={3} borderRadius={'md'} overflow={'hidden'} backgroundColor={'#222'}>
<Flex
py={2}
px={5}