Skip to content

Commit a911e96

Browse files
authored
Fix youtube plugin (#48)
Make it work with links like https://youtube.com/embed/blahblahblah
1 parent 3e42698 commit a911e96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/youtube.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var EXPERIMENTALYoutubeEmbed = []md.Rule{
1818
Filter: []string{"iframe"},
1919
Replacement: func(content string, selec *goquery.Selection, opt *md.Options) *string {
2020
src := selec.AttrOr("src", "")
21-
if !strings.Contains(src, "www.youtube.com") {
21+
if !strings.Contains(src, "youtube.com") {
2222
return nil
2323
}
2424
alt := selec.AttrOr("title", "")

0 commit comments

Comments
 (0)