summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-05-24 13:03:23 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-05-24 13:03:23 +0200
commitffcf26e68cac843f8b257ee72f0282f405ad04a8 (patch)
tree06adee6dd7a399e1422ab0a9f4e954d6dfbc4f26
parent9753cb59f1f1d866943a485dd7c917d1b68f6eda (diff)
Fix broken test
-rw-r--r--tpl/tplimpl/embedded/templates.autogen.go4
-rwxr-xr-xtpl/tplimpl/embedded/templates/shortcodes/twitter.html4
2 files changed, 4 insertions, 4 deletions
diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go
index a64ff83bf..9b4db35d6 100644
--- a/tpl/tplimpl/embedded/templates.autogen.go
+++ b/tpl/tplimpl/embedded/templates.autogen.go
@@ -365,8 +365,8 @@ M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.5
{{- end -}}`},
{`shortcodes/twitter.html`, `{{- $pc := .Page.Site.Config.Privacy.Twitter -}}
{{- if not $pc.Disable -}}
-{{ $url := printf "https://api.twitter.com/1/statuses/oembed.json?id=%s&dnt=%t" (index .Params 0) $pc.EnableDNT }}
-{{ $json := getJSON $url }}
+{{- $url := printf "https://api.twitter.com/1/statuses/oembed.json?id=%s&dnt=%t" (index .Params 0) $pc.EnableDNT -}}
+{{- $json := getJSON $url -}}
{{ $json.html | safeHTML }}
{{- end -}}`},
{`shortcodes/vimeo.html`, `{{- $pc := .Page.Site.Config.Privacy.Vimeo -}}
diff --git a/tpl/tplimpl/embedded/templates/shortcodes/twitter.html b/tpl/tplimpl/embedded/templates/shortcodes/twitter.html
index 62dd21592..472bd8572 100755
--- a/tpl/tplimpl/embedded/templates/shortcodes/twitter.html
+++ b/tpl/tplimpl/embedded/templates/shortcodes/twitter.html
@@ -1,6 +1,6 @@
{{- $pc := .Page.Site.Config.Privacy.Twitter -}}
{{- if not $pc.Disable -}}
-{{ $url := printf "https://api.twitter.com/1/statuses/oembed.json?id=%s&dnt=%t" (index .Params 0) $pc.EnableDNT }}
-{{ $json := getJSON $url }}
+{{- $url := printf "https://api.twitter.com/1/statuses/oembed.json?id=%s&dnt=%t" (index .Params 0) $pc.EnableDNT -}}
+{{- $json := getJSON $url -}}
{{ $json.html | safeHTML }}
{{- end -}} \ No newline at end of file