feature add zhedie

This commit is contained in:
lyf 2024-08-12 14:06:21 +08:00
parent 356155fd30
commit c3c3dd5154
2 changed files with 13 additions and 21 deletions

View File

@ -124,13 +124,7 @@ export function PreCode(props: { children: any }) {
return ( return (
<> <>
<div style={{ position: "relative" }}> <pre ref={ref}>
<pre
ref={ref}
style={{
overflowY: "hidden",
}}
>
<span <span
className="copy-code-button" className="copy-code-button"
onClick={() => { onClick={() => {
@ -142,7 +136,6 @@ export function PreCode(props: { children: any }) {
></span> ></span>
{props.children} {props.children}
</pre> </pre>
</div>
{mermaidCode.length > 0 && ( {mermaidCode.length > 0 && (
<Mermaid code={mermaidCode} key={mermaidCode} /> <Mermaid code={mermaidCode} key={mermaidCode} />
)} )}
@ -243,8 +236,6 @@ function _MarkDownContent(props: { content: string }) {
return escapeBrackets(escapeDollarNumber(props.content)); return escapeBrackets(escapeDollarNumber(props.content));
}, [props.content]); }, [props.content]);
console.log(escapedContent, 11233);
return ( return (
<ReactMarkdown <ReactMarkdown
remarkPlugins={[RemarkMath, RemarkGfm, RemarkBreaks]} remarkPlugins={[RemarkMath, RemarkGfm, RemarkBreaks]}

View File

@ -271,7 +271,8 @@ div.math {
} }
pre { pre {
// position: relative; position: relative;
&:hover .copy-code-button { &:hover .copy-code-button {
pointer-events: all; pointer-events: all;
transform: translateX(0px); transform: translateX(0px);