diff --git a/internal/reader/rewrite/rewriter_test.go b/internal/reader/rewrite/rewriter_test.go
index b38724e3ce6..8948847f6d3 100644
--- a/internal/reader/rewrite/rewriter_test.go
+++ b/internal/reader/rewrite/rewriter_test.go
@@ -50,12 +50,12 @@ func TestReplaceTextLinks(t *testing.T) {
func TestRewriteWithNoMatchingRule(t *testing.T) {
controlEntry := &model.Entry{
- Title: `A title`,
- Content: `Some text.`,
+ Title: `A title`,
+ WebContent: `Some text.`,
}
testEntry := &model.Entry{
- Title: `A title`,
- Content: `Some text.`,
+ Title: `A title`,
+ WebContent: `Some text.`,
}
Rewriter("https://example.org/article", testEntry, ``)
@@ -68,12 +68,12 @@ func TestRewriteWithYoutubeLink(t *testing.T) {
config.Opts = config.NewOptions()
controlEntry := &model.Entry{
- Title: `A title`,
- Content: `
Video Description`,
+ Title: `A title`,
+ WebContent: `
Video Description`,
}
testEntry := &model.Entry{
- Title: `A title`,
- Content: `Video Description`,
+ Title: `A title`,
+ WebContent: `Video Description`,
}
Rewriter("https://www.youtube.com/watch?v=1234", testEntry, ``)
@@ -95,12 +95,12 @@ func TestRewriteWithYoutubeLinkAndCustomEmbedURL(t *testing.T) {
}
controlEntry := &model.Entry{
- Title: `A title`,
- Content: `
Video Description`,
+ Title: `A title`,
+ WebContent: `
Video Description`,
}
testEntry := &model.Entry{
- Title: `A title`,
- Content: `Video Description`,
+ Title: `A title`,
+ WebContent: `Video Description`,
}
Rewriter("https://www.youtube.com/watch?v=1234", testEntry, ``)
@@ -111,12 +111,12 @@ func TestRewriteWithYoutubeLinkAndCustomEmbedURL(t *testing.T) {
func TestRewriteWithInexistingCustomRule(t *testing.T) {
controlEntry := &model.Entry{
- Title: `A title`,
- Content: `Video Description`,
+ Title: `A title`,
+ WebContent: `Video Description`,
}
testEntry := &model.Entry{
- Title: `A title`,
- Content: `Video Description`,
+ Title: `A title`,
+ WebContent: `Video Description`,
}
Rewriter("https://www.youtube.com/watch?v=1234", testEntry, `some rule`)
@@ -127,12 +127,12 @@ func TestRewriteWithInexistingCustomRule(t *testing.T) {
func TestRewriteWithXkcdLink(t *testing.T) {
controlEntry := &model.Entry{
- Title: `A title`,
- Content: ``,
+ Title: `A title`,
+ WebContent: ``,
}
testEntry := &model.Entry{
- Title: `A title`,
- Content: ``,
+ Title: `A title`,
+ WebContent: ``,
}
Rewriter("https://xkcd.com/1912/", testEntry, ``)
@@ -143,12 +143,12 @@ func TestRewriteWithXkcdLink(t *testing.T) {
func TestRewriteWithXkcdLinkHtmlInjection(t *testing.T) {
controlEntry := &model.Entry{
- Title: `A title`,
- Content: ``,
+ Title: `A title`,
+ WebContent: ``,
}
testEntry := &model.Entry{
- Title: `A title`,
- Content: ``,
+ Title: `A title`,
+ WebContent: ``,
}
Rewriter("https://xkcd.com/1912/", testEntry, ``)
@@ -159,12 +159,12 @@ func TestRewriteWithXkcdLinkHtmlInjection(t *testing.T) {
func TestRewriteWithXkcdLinkAndImageNoTitle(t *testing.T) {
controlEntry := &model.Entry{
- Title: `A title`,
- Content: ``,
+ Title: `A title`,
+ WebContent: ``,
}
testEntry := &model.Entry{
- Title: `A title`,
- Content: ``,
+ Title: `A title`,
+ WebContent: ``,
}
Rewriter("https://xkcd.com/1912/", testEntry, ``)
@@ -175,12 +175,12 @@ func TestRewriteWithXkcdLinkAndImageNoTitle(t *testing.T) {
func TestRewriteWithXkcdLinkAndNoImage(t *testing.T) {
controlEntry := &model.Entry{
- Title: `A title`,
- Content: `test`,
+ Title: `A title`,
+ WebContent: `test`,
}
testEntry := &model.Entry{
- Title: `A title`,
- Content: `test`,
+ Title: `A title`,
+ WebContent: `test`,
}
Rewriter("https://xkcd.com/1912/", testEntry, ``)
@@ -191,12 +191,12 @@ func TestRewriteWithXkcdLinkAndNoImage(t *testing.T) {
func TestRewriteWithXkcdAndNoImage(t *testing.T) {
controlEntry := &model.Entry{
- Title: `A title`,
- Content: `test`,
+ Title: `A title`,
+ WebContent: `test`,
}
testEntry := &model.Entry{
- Title: `A title`,
- Content: `test`,
+ Title: `A title`,
+ WebContent: `test`,
}
Rewriter("https://xkcd.com/1912/", testEntry, ``)
@@ -207,12 +207,12 @@ func TestRewriteWithXkcdAndNoImage(t *testing.T) {
func TestRewriteMailtoLink(t *testing.T) {
controlEntry := &model.Entry{
- Title: `A title`,
- Content: `contact [blah blah]`,
+ Title: `A title`,
+ WebContent: `contact [blah blah]`,
}
testEntry := &model.Entry{
- Title: `A title`,
- Content: `contact`,
+ Title: `A title`,
+ WebContent: `contact`,
}
Rewriter("https://www.qwantz.com/", testEntry, ``)
@@ -223,12 +223,12 @@ func TestRewriteMailtoLink(t *testing.T) {
func TestRewriteWithPDFLink(t *testing.T) {
controlEntry := &model.Entry{
- Title: `A title`,
- Content: `PDF
test`,
+ Title: `A title`,
+ WebContent: `PDF
test`,
}
testEntry := &model.Entry{
- Title: `A title`,
- Content: `test`,
+ Title: `A title`,
+ WebContent: `test`,
}
Rewriter("https://example.org/document.pdf", testEntry, ``)
@@ -239,12 +239,12 @@ func TestRewriteWithPDFLink(t *testing.T) {
func TestRewriteWithNoLazyImage(t *testing.T) {
controlEntry := &model.Entry{
- Title: `A title`,
- Content: ``,
+ Title: `A title`,
+ WebContent: ``,
}
testEntry := &model.Entry{
- Title: `A title`,
- Content: ``,
+ Title: `A title`,
+ WebContent: ``,
}
Rewriter("https://example.org/article", testEntry, "add_dynamic_image")
@@ -255,12 +255,12 @@ func TestRewriteWithNoLazyImage(t *testing.T) {
func TestRewriteWithLazyImage(t *testing.T) {
controlEntry := &model.Entry{
- Title: `A title`,
- Content: ``,
+ Title: `A title`,
+ WebContent: ``,
}
testEntry := &model.Entry{
- Title: `A title`,
- Content: ``,
+ Title: `A title`,
+ WebContent: ``,
}
Rewriter("https://example.org/article", testEntry, "add_dynamic_image")
@@ -271,12 +271,12 @@ func TestRewriteWithLazyImage(t *testing.T) {
func TestRewriteWithLazyDivImage(t *testing.T) {
controlEntry := &model.Entry{
- Title: `A title`,
- Content: ``,
+ Title: `A title`,
+ WebContent: ``,
}
testEntry := &model.Entry{
- Title: `A title`,
- Content: `
Test
Hello World!
Test
`, + Title: `A title`, + WebContent: `Test
Hello World!
Test
`, } testEntry := &model.Entry{ - Title: `A title`, - Content: `Test
|
Test
|