<script setup lang="ts">
import { computed } from "vue";
import { renderSafeMarkdown } from "./message-rendering";

const props = defineProps<{ source?: string | null }>();
const html = computed(() => renderSafeMarkdown(props.source));
</script>

<template>
  <div v-if="html" class="message-markdown" v-html="html" />
</template>
