mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
fix: Remove trailing newline in codeblocks
This commit is contained in:
parent
11e2a48f79
commit
b846b809f2
@ -60,6 +60,7 @@ export const SyntaxHighlighterProvider: React.FC<PropsWithChildren> = ({ childre
|
||||
|
||||
const mappedLanguage = languageMap[language] || language
|
||||
|
||||
code = code.trimEnd()
|
||||
const escapedCode = code?.replace(/[<>]/g, (char) => ({ '<': '<', '>': '>' })[char]!)
|
||||
|
||||
try {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user