mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-09-25 17:15:19 +08:00
chore: update default code language to sql (#20)
This commit is contained in:
@ -87,7 +87,7 @@ const MessageView = (props: Props) => {
|
|||||||
pre({ node, className, children, ...props }) {
|
pre({ node, className, children, ...props }) {
|
||||||
const child = children[0] as ReactElement;
|
const child = children[0] as ReactElement;
|
||||||
const match = /language-(\w+)/.exec(child.props.className || "");
|
const match = /language-(\w+)/.exec(child.props.className || "");
|
||||||
const language = match ? match[1] : "text";
|
const language = match ? match[1] : "SQL";
|
||||||
return (
|
return (
|
||||||
<pre className={`${className || ""} w-full p-0 my-1`} {...props}>
|
<pre className={`${className || ""} w-full p-0 my-1`} {...props}>
|
||||||
<CodeBlock
|
<CodeBlock
|
||||||
|
Reference in New Issue
Block a user