mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
markdown
This commit is contained in:
@@ -2,9 +2,7 @@ import React, { useEffect, useRef, memo, useCallback, useState, useMemo } from '
|
||||
import { Box } from '@chakra-ui/react';
|
||||
// @ts-ignore
|
||||
import mermaid from 'mermaid';
|
||||
import MyIcon from '../Icon';
|
||||
|
||||
import styles from './index.module.scss';
|
||||
import MyIcon from '../../Icon';
|
||||
|
||||
const mermaidAPI = mermaid.mermaidAPI;
|
||||
mermaidAPI.initialize({
|
||||
@@ -110,8 +108,8 @@ const MermaidBlock = ({ code }: { code: string }) => {
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
overflowX={'auto'}
|
||||
ref={ref}
|
||||
className={`${styles.mermaid}`}
|
||||
minW={'100px'}
|
||||
minH={'50px'}
|
||||
py={4}
|
@@ -10,8 +10,8 @@ import styles from './index.module.scss';
|
||||
|
||||
import Link from './Link';
|
||||
import CodeLight from './CodeLight';
|
||||
import MermaidCodeBlock from './MermaidCodeBlock';
|
||||
import MdImage from './Image';
|
||||
import MermaidCodeBlock from './img/MermaidCodeBlock';
|
||||
import MdImage from './img/Image';
|
||||
|
||||
function Code({ inline, className, children }: any) {
|
||||
const match = /language-(\w+)/.exec(className || '');
|
||||
|
Reference in New Issue
Block a user