feat(Markdown): enable github markdown alert (#8842)

This commit is contained in:
one
2025-08-05 14:56:15 +08:00
committed by GitHub
parent 63b126b530
commit cb2d7c060c
4 changed files with 15 additions and 0 deletions
@@ -148,6 +148,7 @@
margin-top: 10px;
}
.markdown-alert,
blockquote {
margin: 1.5em 0;
padding: 1em 1.5em;
@@ -1,6 +1,7 @@
import 'katex/dist/katex.min.css'
import 'katex/dist/contrib/copy-tex'
import 'katex/dist/contrib/mhchem'
import 'remark-github-blockquote-alert/alert.css'
import ImageViewer from '@renderer/components/ImageViewer'
import MarkdownShadowDOMRenderer from '@renderer/components/MarkdownShadowDOMRenderer'
@@ -22,6 +23,7 @@ import rehypeMathjax from 'rehype-mathjax'
import rehypeRaw from 'rehype-raw'
import remarkCjkFriendly from 'remark-cjk-friendly'
import remarkGfm from 'remark-gfm'
import remarkAlert from 'remark-github-blockquote-alert'
import remarkMath from 'remark-math'
import { Pluggable } from 'unified'
@@ -90,6 +92,7 @@ const Markdown: FC<Props> = ({ block, postProcess }) => {
const remarkPlugins = useMemo(() => {
const plugins = [
[remarkGfm, { singleTilde: false }] as Pluggable,
[remarkAlert] as Pluggable,
remarkCjkFriendly,
remarkDisableConstructs(['codeIndented'])
]