chore: update default code language to sql (#20)

This commit is contained in:
boojack
2023-04-06 11:11:50 +08:00
committed by GitHub
parent e7de062dfd
commit 219e154530

View File

@ -87,7 +87,7 @@ const MessageView = (props: Props) => {
pre({ node, className, children, ...props }) {
const child = children[0] as ReactElement;
const match = /language-(\w+)/.exec(child.props.className || "");
const language = match ? match[1] : "text";
const language = match ? match[1] : "SQL";
return (
<pre className={`${className || ""} w-full p-0 my-1`} {...props}>
<CodeBlock