{#if token.type === 'html'} {#if html && html.includes(']*>([\s\S]*?)<\/video>/)} {@const videoSrc = video && video[1]} {#if videoSrc} {:else} {token.text} {/if} {:else if token.text && token.text.match(/]*src="https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})(?:\?[^"]*)?"[^>]*><\/iframe>/)} {@const match = token.text.match( /]*src="https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})(?:\?[^"]*)?"[^>]*><\/iframe>/ )} {@const ytId = match && match[1]} {#if ytId} {/if} {:else if token.text.includes(` {/if} {:else if token.text.includes(` {:else} {token.text} {/if} {/if}