Skip to content

Commit

Permalink
fix: markdown highlighting
Browse files Browse the repository at this point in the history
Remove styles overriding <strong> and <em> formatting.
  • Loading branch information
cgawron committed Mar 20, 2024
1 parent e14c8e3 commit 5b4c8ac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
19 changes: 15 additions & 4 deletions src/assets/style/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,30 @@
--text-color: #dfe2eb;
--text-color-gray: #a7acbb;
}

[data-size="small"] {
--font-size-base: 12px;
}

[data-size="middle"] {
--font-size-base: 13px;
}

[data-size="default"] {
--font-size-base: 14px;
}

[data-size="large"] {
--font-size-base: 16px;
}

html {
background-color: var(--background-color-gray);
}

* {
vertical-align: baseline;
font-weight: inherit;
font-family: inherit;
font-style: inherit;

font-size: 100%;
outline: 0;
padding: 0;
Expand All @@ -102,35 +105,43 @@ textarea {
color: var(--text-color);
display: block;
width: 100%;

&::placeholder {
color: var(--text-color-gray);
}
}

body {
font-family: sans-serif;
color: var(--text-color);
}

.flex {
display: flex;

&-c {
display: flex;
align-items: center;

&-c {
display: flex;
align-items: center;
justify-content: center;
}

&-sb {
display: flex;
align-items: center;
justify-content: space-between;
}
}

&-column {
display: flex;
flex-direction: column;
}

&-1 {
flex: 1;
}
}
}
4 changes: 2 additions & 2 deletions src/chat/MessageRender.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { memo } from 'react'
import ReactMarkdown from 'react-markdown'
import Markdown from 'react-markdown'
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'
import { oneLight, oneDark } from 'react-syntax-highlighter/dist/esm/styles/prism'
import { useGlobal } from './context'
Expand All @@ -14,7 +14,7 @@ export const MessageRender = memo((props) => {
const { options } = useGlobal()
const style = options.general.theme === 'dark' ? oneDark : oneLight
return (
<ReactMarkdown
<Markdown
className="z-ui-markdown"
children={props.children}
remarkPlugins={[remarkMath, remarkGfm, remarkBreaks]}
Expand Down

0 comments on commit 5b4c8ac

Please sign in to comment.