We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f7d438 commit ae28afcCopy full SHA for ae28afc
app/models/spina/embeds/youtube.rb
@@ -6,7 +6,7 @@ class Youtube < Base
6
7
heroicon "video-camera"
8
9
- REGEX = /(?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/
+ REGEX = /(?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|shorts\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/
10
11
validates :url, presence: true, format: {with: REGEX}
12
0 commit comments