detect callouts
This commit is contained in:
parent
8c4d92dab7
commit
2d54180a2c
Binary file not shown.
@ -1,3 +1,13 @@
|
||||
<p class="border border-l-4 ml-4 prose-p:my-2 prose-p:mx-4">
|
||||
<slot />
|
||||
</p>
|
||||
<script lang="ts">
|
||||
export let raw: string;
|
||||
|
||||
let isCallout = raw.split('\n')[0].match(/>\s?\[!(.+)\]\s(.*) /) != null;
|
||||
</script>
|
||||
|
||||
{#if isCallout}
|
||||
<p>IS CALLOUT!!</p>
|
||||
{:else}
|
||||
<p class="border border-l-4 ml-4 prose-p:my-2 prose-p:mx-4">
|
||||
<slot />
|
||||
</p>
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user