Skip to content

Commit

Permalink
make converted html computed to ensure it gets updated if markdown ch…
Browse files Browse the repository at this point in the history
…anges
  • Loading branch information
lkeegan committed Dec 18, 2024
1 parent b7a5209 commit 79c7f3b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/components/MarkdownComponent.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup lang="ts">
import showdown from "showdown";
import { computed } from "vue";
const props = defineProps({
markdown: {
Expand All @@ -9,7 +10,9 @@ const props = defineProps({
});
const markdownConverter = new showdown.Converter();
const convertedHtml = markdownConverter.makeHtml(props.markdown);
const convertedHtml = computed(() =>
markdownConverter.makeHtml(props.markdown),
);
</script>

<template>
Expand Down

0 comments on commit 79c7f3b

Please sign in to comment.