fix(Markdown): regex for style (#9839)

This commit is contained in:
one 2025-09-03 14:19:06 +08:00 committed by GitHub
parent b725400428
commit 6d1f3a5729
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -140,7 +140,7 @@ const Markdown: FC<Props> = ({ block, postProcess }) => {
} as Partial<Components>
}, [block.id])
if (messageContent.includes('<style>')) {
if (/<style\b[^>]*>/i.test(messageContent)) {
components.style = MarkdownShadowDOMRenderer as any
}