mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 21:05:19 +00:00
refac
This commit is contained in:
parent
6fd082d55f
commit
1a6e4c2948
1 changed files with 2 additions and 2 deletions
|
|
@ -22,9 +22,9 @@
|
||||||
{#if token.type === 'html'}
|
{#if token.type === 'html'}
|
||||||
{#if html && html.includes('<video')}
|
{#if html && html.includes('<video')}
|
||||||
{@html html}
|
{@html html}
|
||||||
{:else if token.text && token.text.match(/<iframe\s+[^>]*src="https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})"[^>]*><\/iframe>/)}
|
{:else if token.text && token.text.match(/<iframe\s+[^>]*src="https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})(?:\?[^"]*)?"[^>]*><\/iframe>/)}
|
||||||
{@const match = token.text.match(
|
{@const match = token.text.match(
|
||||||
/<iframe\s+[^>]*src="https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})"[^>]*><\/iframe>/
|
/<iframe\s+[^>]*src="https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})(?:\?[^"]*)?"[^>]*><\/iframe>/
|
||||||
)}
|
)}
|
||||||
{@const ytId = match && match[1]}
|
{@const ytId = match && match[1]}
|
||||||
{#if ytId}
|
{#if ytId}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue