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

@ -121,7 +121,12 @@
{/if} {/if}
{: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}
{@const br = token.text.match(/<br\s*\/?>/)}
{#if br}
<br />
{:else} {:else}
{token.text} {token.text}
{/if} {/if}
{/if} {/if}
{/if}