This commit is contained in:
wangxiaolei 2025-12-29 13:07:59 +08:00 committed by GitHub
commit 8c5fce7dcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -18,12 +18,19 @@ const BasicContent: FC<BasicContentProps> = ({
if (annotation?.logAnnotation)
return <Markdown content={annotation?.logAnnotation.content || ''} />
// Preserve Windows UNC paths and similar backslash-heavy strings by
// wrapping them in inline code so Markdown renders backslashes verbatim.
let displayContent = content
if (typeof content === 'string' && /^\\\\\S.*/.test(content) && !/^`.*`$/.test(content)) {
displayContent = `\`${content}\``
}
return (
<Markdown
className={cn(
item.isError && '!text-[#F04438]',
)}
content={content}
content={displayContent}
/>
)
}