Remove unintended whitespaces from markdown links

soper-book
Alex Shpak 2020-03-22 19:09:09 +01:00
parent a3059fe4f7
commit bccdeca767
2 changed files with 6 additions and 6 deletions

View File

@ -1,8 +1,8 @@
{{ if .Page.Site.Params.BookPortableLinks }} {{- if .Page.Site.Params.BookPortableLinks -}}
{{- template "portable-image" . -}} {{- template "portable-image" . -}}
{{ else }} {{- else -}}
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title }}title="{{ . }}"{{ end }}/> <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title }}title="{{ . }}"{{ end }}/>
{{ end }} {{- end -}}
{{- define "portable-image" -}} {{- define "portable-image" -}}
{{- $isRemote := or (in .Destination "://") (strings.HasPrefix .Destination "//") }} {{- $isRemote := or (in .Destination "://") (strings.HasPrefix .Destination "//") }}

View File

@ -1,8 +1,8 @@
{{ if .Page.Site.Params.BookPortableLinks }} {{- if .Page.Site.Params.BookPortableLinks -}}
{{- template "portable-link" . -}} {{- template "portable-link" . -}}
{{ else }} {{- else -}}
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a> <a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
{{ end }} {{- end -}}
{{- define "portable-link" -}} {{- define "portable-link" -}}
{{- $destination := .Destination }} {{- $destination := .Destination }}