From a911e9630f808037c97a7ec2ea75ef0d6be153d1 Mon Sep 17 00:00:00 2001 From: vivook Date: Wed, 25 May 2022 18:01:20 +0100 Subject: [PATCH] Fix youtube plugin (#48) Make it work with links like https://youtube.com/embed/blahblahblah --- plugin/youtube.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/youtube.go b/plugin/youtube.go index f59f714..1566478 100644 --- a/plugin/youtube.go +++ b/plugin/youtube.go @@ -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", "")