1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-22 17:18:37 +00:00

Add template helper isEmail()

This commit is contained in:
Frédéric Guillot 2017-11-25 17:08:04 -08:00
parent 39b03cc393
commit 29c5d82016
3 changed files with 12 additions and 4 deletions

View file

@ -15,7 +15,7 @@
</span>
{{ if .entry.Author }}
<span class="entry-author">
{{ if contains .entry.Author "@" }}
{{ if isEmail .entry.Author }}
- <a href="mailto:{{ .entry.Author }}">{{ .entry.Author }}</a>
{{ else }}
<em>{{ .entry.Author }}</em>