update
This commit is contained in:
12
src/services/markdownRenderer.ts
Normal file
12
src/services/markdownRenderer.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import MarkdownIt from 'markdown-it'
|
||||
|
||||
const renderer = new MarkdownIt({
|
||||
html: false,
|
||||
breaks: true,
|
||||
linkify: false,
|
||||
typographer: false,
|
||||
})
|
||||
|
||||
export function renderMarkdown(value: string): string {
|
||||
return renderer.render(value || '')
|
||||
}
|
||||
Reference in New Issue
Block a user