Skip to content

Commit

Permalink
fix CodeSource component
Browse files Browse the repository at this point in the history
  • Loading branch information
Linko91 committed Sep 2, 2024
1 parent c3d869b commit 1c5e76b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/common/CodeSource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="flex flex-col gap-2">
<n-card content-class="bg-secondary-color !p-0" class="overflow-hidden" v-if="!showSource">
<div class="scrollbar-styled overflow-hidden code-bg-transparent" v-shiki="{ lang, decode }">
<pre v-html="code"></pre>
<pre v-html="source"></pre>
</div>
</n-card>

Expand Down Expand Up @@ -37,5 +37,5 @@ const { code, lang } = defineProps<{
}>()
const showSource = ref(false)
const source = computed(() => code.toString())
const source = computed(() => JSON.stringify(code, null, "\t"))
</script>

0 comments on commit 1c5e76b

Please sign in to comment.