Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
d592d4e9
authored
Jun 20, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
markdown
parent
11ce10cd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
6 deletions
+4
-6
client/src/components/Markdown/img/Image.tsx
+0
-0
client/src/components/Markdown/img/Loading.tsx
+0
-0
client/src/components/Markdown/img/MermaidCodeBlock.tsx
+2
-4
client/src/components/Markdown/index.tsx
+2
-2
No files found.
client/src/components/Markdown/Image.tsx
→
client/src/components/Markdown/
img/
Image.tsx
View file @
d592d4e9
File moved
client/src/components/Markdown/Loading.tsx
→
client/src/components/Markdown/
img/
Loading.tsx
View file @
d592d4e9
File moved
client/src/components/Markdown/MermaidCodeBlock.tsx
→
client/src/components/Markdown/
img/
MermaidCodeBlock.tsx
View file @
d592d4e9
...
@@ -2,9 +2,7 @@ import React, { useEffect, useRef, memo, useCallback, useState, useMemo } from '
...
@@ -2,9 +2,7 @@ import React, { useEffect, useRef, memo, useCallback, useState, useMemo } from '
import
{
Box
}
from
'@chakra-ui/react'
;
import
{
Box
}
from
'@chakra-ui/react'
;
// @ts-ignore
// @ts-ignore
import
mermaid
from
'mermaid'
;
import
mermaid
from
'mermaid'
;
import
MyIcon
from
'../Icon'
;
import
MyIcon
from
'../../Icon'
;
import
styles
from
'./index.module.scss'
;
const
mermaidAPI
=
mermaid
.
mermaidAPI
;
const
mermaidAPI
=
mermaid
.
mermaidAPI
;
mermaidAPI
.
initialize
({
mermaidAPI
.
initialize
({
...
@@ -110,8 +108,8 @@ const MermaidBlock = ({ code }: { code: string }) => {
...
@@ -110,8 +108,8 @@ const MermaidBlock = ({ code }: { code: string }) => {
}
}
}
}
>
>
<
Box
<
Box
overflowX=
{
'auto'
}
ref=
{
ref
}
ref=
{
ref
}
className=
{
`${styles.mermaid}`
}
minW=
{
'100px'
}
minW=
{
'100px'
}
minH=
{
'50px'
}
minH=
{
'50px'
}
py=
{
4
}
py=
{
4
}
...
...
client/src/components/Markdown/index.tsx
View file @
d592d4e9
...
@@ -10,8 +10,8 @@ import styles from './index.module.scss';
...
@@ -10,8 +10,8 @@ import styles from './index.module.scss';
import
Link
from
'./Link'
;
import
Link
from
'./Link'
;
import
CodeLight
from
'./CodeLight'
;
import
CodeLight
from
'./CodeLight'
;
import
MermaidCodeBlock
from
'./MermaidCodeBlock'
;
import
MermaidCodeBlock
from
'./
img/
MermaidCodeBlock'
;
import
MdImage
from
'./Image'
;
import
MdImage
from
'./
img/
Image'
;
function
Code
({
inline
,
className
,
children
}:
any
)
{
function
Code
({
inline
,
className
,
children
}:
any
)
{
const
match
=
/language-
(\w
+
)
/
.
exec
(
className
||
''
);
const
match
=
/language-
(\w
+
)
/
.
exec
(
className
||
''
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment