aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/template/feed.tpl.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-05-02 02:06:56 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-05-02 02:06:56 +0200
commitff4f709486a69bc1650db73a003255e58cae0532 (patch)
tree66f9c0008e11f36e7ed8b50858577a4308ea10f0 /internal/feed/template/feed.tpl.go
parentb44a7b8307f2928039f0da8205518818fb4247b1 (diff)
downloadfeed2imap-go-ff4f709486a69bc1650db73a003255e58cae0532.tar.gz
feed2imap-go-ff4f709486a69bc1650db73a003255e58cae0532.tar.bz2
feed2imap-go-ff4f709486a69bc1650db73a003255e58cae0532.zip
Embedding images in mail
Diffstat (limited to 'internal/feed/template/feed.tpl.go')
-rw-r--r--internal/feed/template/feed.tpl.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/internal/feed/template/feed.tpl.go b/internal/feed/template/feed.tpl.go
index 8aab9d7..0e09180 100644
--- a/internal/feed/template/feed.tpl.go
+++ b/internal/feed/template/feed.tpl.go
@@ -40,14 +40,8 @@ const feedTpl = `{{- /*gotype:github.com/Necoro/feed2imap-go/internal/feed.feedi
</td>
</tr>
</table>
-{{with .Item.Content}}
- <br /> <!-- originally: only if content and 'content !~ /\A\s*</m' -->
+{{with .Body}}
{{html .}}
-{{else}}
-{{with .Item.Description}}
- <br /> <!-- originally: only if content and 'content !~ /\A\s*</m' -->
- {{html .}}
-{{end}}
{{end}}
{{with .Item.Enclosures}}
<table border="1" width="100%" cellpadding="0" cellspacing="0" style="border-spacing: 0; ">
@@ -59,7 +53,7 @@ const feedTpl = `{{- /*gotype:github.com/Necoro/feed2imap-go/internal/feed.feedi
<tr>
<td>
&nbsp;&nbsp;&nbsp;
- <a href={{.URL}}>{{.URL | lastUrlPart}}</a> ({{.Length | byteCount}}, {{.Type}})
+ <a href={{.URL}}>{{.URL | lastUrlPart}}</a> ({{with .Length}}{{. | byteCount}}, {{end}}{{.Type}})
</td>
</tr>
{{end}}