mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-11 21:12:09 +08:00
fix(updater): render release notes without remark-gfm
Remove GFM extensions that require unsupported regular expressions on older WebKit. Keep native Markdown links, existing release-note styling, and HTML sanitization. Closes #8079 Closes #8082
This commit is contained in:
@@ -72,12 +72,10 @@ const LazyReactMarkdown = lazy(async () => {
|
||||
{ default: ReactMarkdown },
|
||||
{ default: rehypeRaw },
|
||||
{ default: rehypeSanitize, defaultSchema },
|
||||
{ default: remarkGfm },
|
||||
] = await Promise.all([
|
||||
import('react-markdown'),
|
||||
import('rehype-raw'),
|
||||
import('rehype-sanitize'),
|
||||
import('remark-gfm'),
|
||||
])
|
||||
|
||||
const sanitizeSchema = {
|
||||
@@ -104,7 +102,6 @@ const LazyReactMarkdown = lazy(async () => {
|
||||
default: (props: ReactMarkdownOptions) => (
|
||||
<ReactMarkdown
|
||||
{...props}
|
||||
remarkPlugins={[remarkGfm, ...(props.remarkPlugins ?? [])]}
|
||||
rehypePlugins={[rehypeRaw, [rehypeSanitize, sanitizeSchema]]}
|
||||
/>
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user