mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-01 09:49:03 +08:00
fix(Markdown): regex for style (#9839)
This commit is contained in:
parent
b725400428
commit
6d1f3a5729
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user