mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 10:40:07 +08:00
refactor(Markdown): disable single-tilde strikethrough (#8209)
This commit is contained in:
parent
ff0994e1c7
commit
aa254a3772
@ -21,6 +21,7 @@ import rehypeRaw from 'rehype-raw'
|
||||
import remarkCjkFriendly from 'remark-cjk-friendly'
|
||||
import remarkGfm from 'remark-gfm'
|
||||
import remarkMath from 'remark-math'
|
||||
import { Pluggable } from 'unified'
|
||||
|
||||
import CodeBlock from './CodeBlock'
|
||||
import Link from './Link'
|
||||
@ -41,7 +42,11 @@ const Markdown: FC<Props> = ({ block }) => {
|
||||
const { mathEngine } = useSettings()
|
||||
|
||||
const remarkPlugins = useMemo(() => {
|
||||
const plugins = [remarkGfm, remarkCjkFriendly, remarkDisableConstructs(['codeIndented'])]
|
||||
const plugins = [
|
||||
[remarkGfm, { singleTilde: false }] as Pluggable,
|
||||
remarkCjkFriendly,
|
||||
remarkDisableConstructs(['codeIndented'])
|
||||
]
|
||||
if (mathEngine !== 'none') {
|
||||
plugins.push(remarkMath)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user