Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-fe
Commits
a093ed3c
Commit
a093ed3c
authored
Dec 11, 2024
by
shirlyn.guo
👌🏻
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.gsstcloud.com/poc/poc-fe
into shirlyn
parents
8dde243d
762c52ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
markdown-render.vue
src/components/markdown-render/markdown-render.vue
+3
-3
No files found.
src/components/markdown-render/markdown-render.vue
View file @
a093ed3c
<
script
setup
lang=
"ts"
>
import
{
computed
,
ref
,
watchEffect
}
from
'vue'
import
{
m
arked
}
from
'marked'
import
{
M
arked
}
from
'marked'
import
{
markedHighlight
}
from
'marked-highlight'
import
{
throttle
}
from
'lodash-es'
import
DOMPurify
from
'dompurify'
...
...
@@ -20,7 +20,7 @@ const props = withDefaults(defineProps<Props>(), {
color
:
'#333'
,
})
marked
.
use
({
gfm
:
true
,
async
:
true
}).
use
(
const
marked
=
new
Marked
(
markedHighlight
({
emptyLangClass
:
'hljs'
,
langPrefix
:
'hljs language-'
,
...
...
@@ -30,7 +30,7 @@ marked.use({ gfm: true, async: true }).use(
return
hljs
.
highlight
(
code
,
{
language
}).
value
},
}),
)
)
.
use
({
gfm
:
true
,
async
:
true
})
const
renderTextContent
=
ref
(
''
)
...
...
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