Skip to content

Commit

Permalink
Fix youtube plugin (#48)
Browse files Browse the repository at this point in the history
Make it work with links like https://youtube.com/embed/blahblahblah
  • Loading branch information
vivook authored May 25, 2022
1 parent 3e42698 commit a911e96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/youtube.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var EXPERIMENTALYoutubeEmbed = []md.Rule{
Filter: []string{"iframe"},
Replacement: func(content string, selec *goquery.Selection, opt *md.Options) *string {
src := selec.AttrOr("src", "")
if !strings.Contains(src, "www.youtube.com") {
if !strings.Contains(src, "youtube.com") {
return nil
}
alt := selec.AttrOr("title", "")
Expand Down

0 comments on commit a911e96

Please sign in to comment.