switch to svelte markdown
This commit is contained in:
parent
6fa049504b
commit
a0b4f60e65
7 changed files with 71 additions and 41 deletions
14
src/lib/markdown/renderers/Code.svelte
Normal file
14
src/lib/markdown/renderers/Code.svelte
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<script lang="ts">
|
||||
interface Props {
|
||||
lang?: string;
|
||||
text?: string;
|
||||
}
|
||||
|
||||
const { text = '' }: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="mockup-code w-full">
|
||||
{#each text.split('\n') as line, index (index)}
|
||||
<pre data-prefix={index + 1}><code>{line}</code></pre>
|
||||
{/each}
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue