Skip to content

Commit

Permalink
fix: markdown render compatiblity
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Jul 26, 2023
1 parent b675446 commit d81a08a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 130 deletions.
5 changes: 4 additions & 1 deletion src/module.ts
Expand Up @@ -619,7 +619,10 @@ export default defineNuxtModule<ModuleOptions>({
await installModule('nuxt-mdc', {
remarkPlugins: contentContext.markdown.remarkPlugins,
rehypePlugins: contentContext.markdown.rehypePlugins,
highlight: contentContext.highlight
highlight: contentContext.highlight,
components: {
map: contentContext.markdown.tags
}
})

nuxt.options.runtimeConfig.public.content = defu(nuxt.options.runtimeConfig.public.content, {
Expand Down
39 changes: 21 additions & 18 deletions src/runtime/components/ContentSlot.vue
@@ -1,23 +1,26 @@
<template>
<MDCSlot :use="use" :unwrap="unwrap" />
</template>
<script lang="ts">
import { defineComponent, h, resolveComponent } from 'vue'
<script setup lang="ts">
defineProps({
/**
* A slot name or function
*/
use: {
type: Function,
default: undefined
export default defineComponent({
props: {
/**
* A slot name or function
*/
use: {
type: Function,
default: undefined
},
/**
* Tags to unwrap separated by spaces
* Example: 'ul li'
*/
unwrap: {
type: [Boolean, String],
default: false
}
},
/**
* Tags to unwrap separated by spaces
* Example: 'ul li'
*/
unwrap: {
type: [Boolean, String],
default: false
render (props: any) {
return h(resolveComponent('MDCSlot'), props)
}
})
</script>
111 changes: 0 additions & 111 deletions src/runtime/markdown-parser/index.ts

This file was deleted.

0 comments on commit d81a08a

Please sign in to comment.