refac: markdown br rendering
This commit is contained in:
parent
d2a3aacaba
commit
d4f70830d1
|
@ -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}
|
||||||
|
|
Loading…
Reference in New Issue