diff --git a/reader/rewrite/rewrite_functions.go b/reader/rewrite/rewrite_functions.go index 8988cc5afcc..8f83aa950ec 100644 --- a/reader/rewrite/rewrite_functions.go +++ b/reader/rewrite/rewrite_functions.go @@ -143,7 +143,7 @@ func addYoutubeVideo(entryURL, entryContent string) string { if len(matches) == 2 { video := `` - return video + "

" + replaceLineFeeds(replaceTextLinks(entryContent)) + "

" + return video + `
` + entryContent } return entryContent } diff --git a/reader/rewrite/rewriter_test.go b/reader/rewrite/rewriter_test.go index 27cf425741c..8c0db6cf822 100644 --- a/reader/rewrite/rewriter_test.go +++ b/reader/rewrite/rewriter_test.go @@ -36,8 +36,8 @@ func TestRewriteWithNoMatchingRule(t *testing.T) { } func TestRewriteWithYoutubeLink(t *testing.T) { - output := Rewriter("https://www.youtube.com/watch?v=1234", "Video Description\nhttp://example.org/path", ``) - expected := `

Video Description
http://example.org/path

` + output := Rewriter("https://www.youtube.com/watch?v=1234", "Video Description", ``) + expected := `
Video Description` if expected != output { t.Errorf(`Not expected output: got "%s" instead of "%s"`, output, expected)