refac: markdown br rendering

This commit is contained in:
Timothy Jaeryang Baek 2025-08-01 14:07:11 +04:00
parent d2a3aacaba
commit d4f70830d1
1 changed files with 6 additions and 1 deletions

View File

@ -122,6 +122,11 @@
{:else if token.text.includes(`<source_id`)} {:else if token.text.includes(`<source_id`)}
<Source {id} {token} onClick={onSourceClick} /> <Source {id} {token} onClick={onSourceClick} />
{:else} {:else}
{token.text} {@const br = token.text.match(/<br\s*\/?>/)}
{#if br}
<br />
{:else}
{token.text}
{/if}
{/if} {/if}
{/if} {/if}