Update: Replace react-syntax-highlighter with Prism in CodeBlock component
In this commit, we replaced the react-syntax-highlighter package with the Prism component from the same package. This change improves the syntax highlighting performance and provides better support for various programming languages. The okaidia theme is also imported for a consistent look and feel.
This commit is contained in:
parent
70d1668e6c
commit
2d6692ff39
@ -2,7 +2,7 @@ import { Tooltip, ActionIcon, CopyButton, Flex } from "@mantine/core";
|
||||
import { IconCheck, IconGitCommit, IconFileDiff, IconColumnInsertRight, IconReplace, IconCopy } from "@tabler/icons-react";
|
||||
import React, { useState } from "react";
|
||||
import ReactMarkdown from "react-markdown";
|
||||
import SyntaxHighlighter from "react-syntax-highlighter";
|
||||
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
||||
import { okaidia } from "react-syntax-highlighter/dist/esm/styles/prism";
|
||||
|
||||
import messageUtil from '../../util/MessageUtil';
|
||||
|
Loading…
x
Reference in New Issue
Block a user