Skip to content

Commit d285288

Browse files
authored
Support embedding youtube shorts (#1824)
1 parent 2c1cc8c commit d285288

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libraries/Library/Std/Widgets/Embed.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ function embed.youtube(specOrUrl)
4141
if not videoId then
4242
videoId = string.match(specOrUrl.url, "youtu%.be/(.+)")
4343
end
44+
if not videoId then
45+
videoId = string.match(specOrUrl.url, "youtube%.com/shorts/(.+)")
46+
end
4447
4548
if not videoId then
4649
error("No video id found")

0 commit comments

Comments
 (0)