Calendar: Link to first URL from description #30
|
@ -13,7 +13,12 @@
|
||||||
<tr>
|
<tr>
|
||||||
{{- $start := time .dtstart }}
|
{{- $start := time .dtstart }}
|
||||||
<td style="font-variant-numeric: tabular-nums;">{{ $start.Local.Format "Mon, 2006-01-02 15:04" }}</td>
|
<td style="font-variant-numeric: tabular-nums;">{{ $start.Local.Format "Mon, 2006-01-02 15:04" }}</td>
|
||||||
|
{{- $potentialUrl := index (findRE `https?://\S*` .description 1) 0 }}
|
||||||
|
{{- if eq $potentialUrl nil }}
|
||||||
<td>{{ .summary }}</td>
|
<td>{{ .summary }}</td>
|
||||||
|
{{- else }}
|
||||||
|
<td><a href="{{ $potentialUrl }}">{{ .summary }}</a></td>
|
||||||
|
{{- end }}
|
||||||
<td>{{ .location }}</td>
|
<td>{{ .location }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue