diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-09-29 14:51:51 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-09-29 23:22:41 +0200 |
commit | 329e88db1f6d043d32c7083570773dccfd4f11fc (patch) | |
tree | a4bab342aa28523be8c854ceb88fece17f634410 /tpl/tplimpl/embedded/templates.autogen.go | |
parent | e073f4efb1345f6408000ef3f389873f8cf7179e (diff) |
Support typed bool, int and float in shortcode params
This means that you now can do:
{{< vidur 9KvBeKu false true 32 3.14 >}}
And the boolean and numeric values will be converted to `bool`, `int` and `float64`.
If you want these to be strings, they must be quoted:
{{< vidur 9KvBeKu "false" "true" "32" "3.14" >}}
Fixes #6371
Diffstat (limited to 'tpl/tplimpl/embedded/templates.autogen.go')
-rw-r--r-- | tpl/tplimpl/embedded/templates.autogen.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go index 0b57077bb..50016764f 100644 --- a/tpl/tplimpl/embedded/templates.autogen.go +++ b/tpl/tplimpl/embedded/templates.autogen.go @@ -422,7 +422,7 @@ if (!doNotTrack) { {{- if $pc.Simple -}} {{ template "_internal/shortcodes/twitter_simple.html" . }} {{- else -}} -{{- $url := printf "https://api.twitter.com/1/statuses/oembed.json?id=%s&dnt=%t" (index .Params 0) $pc.EnableDNT -}} +{{- $url := printf "https://api.twitter.com/1/statuses/oembed.json?id=%v&dnt=%t" (index .Params 0) $pc.EnableDNT -}} {{- $json := getJSON $url -}} {{ $json.html | safeHTML }} {{- end -}} |