rdunk / sanity-blocks-vue-component

[DEPRECATED] Vue component for rendering block content from Sanity
MIT License
71 stars 10 forks source link

[Bug] Functional components not rendering #13

Open mornir opened 4 years ago

mornir commented 4 years ago

I use this serializer to render external link:

<template functional>
  <a
    v-if="props.href && children[0] && children[0].text"
    :href="props.href"
    target="_blank"
    rel="noopener"
    class="underline"
  >
    <slot />
  </a>
</template>

When marking the link bold, the marked text is not rendered: image

Expected

A bold link: image

This component handles this case correctly: https://github.com/nuxt-community/sanity-module/blob/main/src/components/sanity-content.ts