You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
434 B
26 lines
434 B
<template>
|
|
<div v-html="marked($slots.default[0].text.trim() || '')" />
|
|
</template>
|
|
<script>
|
|
import marked from 'marked'
|
|
marked.setOptions({
|
|
renderer: new marked.Renderer(),
|
|
gfm: true,
|
|
tables: true,
|
|
breaks: false,
|
|
pedantic: true,
|
|
sanitize: true,
|
|
smartLists: true,
|
|
smartypants: true,
|
|
})
|
|
export default {
|
|
name: 'md',
|
|
data () {
|
|
console.log(this.$slots.default)
|
|
return {
|
|
marked,
|
|
}
|
|
},
|
|
}
|
|
</script>
|