diff options
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/app/components/Gaming/CodeBlock.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/frontend/app/components/Gaming/CodeBlock.tsx b/frontend/app/components/Gaming/CodeBlock.tsx index 36ccae1..16ff84e 100644 --- a/frontend/app/components/Gaming/CodeBlock.tsx +++ b/frontend/app/components/Gaming/CodeBlock.tsx @@ -29,7 +29,9 @@ export default function CodeBlock({ code, language }: Props) { return ( <pre className="h-full w-full p-2 bg-gray-50 rounded-lg border border-gray-300 whitespace-pre-wrap break-words"> - {highlightedCode === null ? null : ( + {highlightedCode === null ? ( + <code>{code}</code> + ) : ( <code dangerouslySetInnerHTML={{ __html: highlightedCode }} /> )} </pre> |
