Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lite_youtube_embed
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
lite_youtube_embed
Commits
64fd5e69
Commit
64fd5e69
authored
7 months ago
by
Justin Norton
Committed by
Andreas Mayr
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3420823
by jnorton: Allow /shorts path in regex
parent
5f0be6ab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1
Update LiteYoutubeEmbedFormatter.php
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Plugin/Field/FieldFormatter/LiteYoutubeEmbedFormatter.php
+2
-2
2 additions, 2 deletions
...Plugin/Field/FieldFormatter/LiteYoutubeEmbedFormatter.php
with
2 additions
and
2 deletions
src/Plugin/Field/FieldFormatter/LiteYoutubeEmbedFormatter.php
+
2
−
2
View file @
64fd5e69
...
...
@@ -355,8 +355,8 @@ class LiteYoutubeEmbedFormatter extends FormatterBase {
$pattern_group_host
.
=
'youtu\.be/|youtube\.com/'
;
// Group path alternatives...
$pattern_group_host
.
=
'(?:'
;
// Either /embed/ or /v/ or
or
/watch?v= or /watch?other_param&v=.
$pattern_group_host
.
=
'embed/|v/|watch\?v=|watch\?.+&v='
;
// Either /embed/ or /v/ or /watch?v= or /watch?other_param&v=.
or shorts/.
$pattern_group_host
.
=
'embed/|v/|watch\?v=|watch\?.+&v=
|shorts/
'
;
// End path alternatives.
$pattern_group_host
.
=
')'
;
// End host alternatives.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment