From 00297085db48cbb7949c9867012f6df38817fc29 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Thu, 29 Aug 2019 11:27:14 -0400 Subject: [PATCH] tpl: Migrate last shortcodes (YouTube and Vimeo) to HTTPS embeds --- hugolib/embedded_shortcodes_test.go | 12 ++++++------ tpl/tplimpl/embedded/templates.autogen.go | 6 +++--- tpl/tplimpl/embedded/templates/shortcodes/vimeo.html | 4 ++-- .../embedded/templates/shortcodes/youtube.html | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hugolib/embedded_shortcodes_test.go b/hugolib/embedded_shortcodes_test.go index a6f38d8f7..b169cd74e 100644 --- a/hugolib/embedded_shortcodes_test.go +++ b/hugolib/embedded_shortcodes_test.go @@ -173,17 +173,17 @@ func TestShortcodeYoutube(t *testing.T) { }{ { `{{< youtube w7Ft2ymGmfc >}}`, - "(?s)\n
.*?.*?
\n", + "(?s)\n
.*?.*?
\n", }, // set class { `{{< youtube w7Ft2ymGmfc video>}}`, - "(?s)\n
.*?.*?
\n", + "(?s)\n
.*?.*?
\n", }, // set class and autoplay (using named params) { `{{< youtube id="w7Ft2ymGmfc" class="video" autoplay="true" >}}`, - "(?s)\n
.*?.*?
", + "(?s)\n
.*?.*?
", }, } { var ( @@ -212,17 +212,17 @@ func TestShortcodeVimeo(t *testing.T) { }{ { `{{< vimeo 146022717 >}}`, - "(?s)\n
.*?.*?
\n", + "(?s)\n
.*?.*?
\n", }, // set class { `{{< vimeo 146022717 video >}}`, - "(?s)\n
.*?.*?
\n", + "(?s)\n
.*?.*?
\n", }, // set class (using named params) { `{{< vimeo id="146022717" class="video" >}}`, - "(?s)^
.*?.*?
", + "(?s)^
.*?.*?
", }, } { var ( diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go index a386a05a5..5850d6874 100644 --- a/tpl/tplimpl/embedded/templates.autogen.go +++ b/tpl/tplimpl/embedded/templates.autogen.go @@ -466,10 +466,10 @@ if (!doNotTrack) { {{ template "_internal/shortcodes/vimeo_simple.html" . }} {{- else -}} {{ if .IsNamedParams }}
- +
{{ else }}
- +
{{ end }} {{- end -}} @@ -499,7 +499,7 @@ if (!doNotTrack) { {{- $id := .Get "id" | default (.Get 0) -}} {{- $class := .Get "class" | default (.Get 1) }}
- +
{{ end -}} `}, diff --git a/tpl/tplimpl/embedded/templates/shortcodes/vimeo.html b/tpl/tplimpl/embedded/templates/shortcodes/vimeo.html index 2929aa4ab..94f03470e 100644 --- a/tpl/tplimpl/embedded/templates/shortcodes/vimeo.html +++ b/tpl/tplimpl/embedded/templates/shortcodes/vimeo.html @@ -4,10 +4,10 @@ {{ template "_internal/shortcodes/vimeo_simple.html" . }} {{- else -}} {{ if .IsNamedParams }}
- +
{{ else }}
- +
{{ end }} {{- end -}} diff --git a/tpl/tplimpl/embedded/templates/shortcodes/youtube.html b/tpl/tplimpl/embedded/templates/shortcodes/youtube.html index ff268c511..9e8477659 100644 --- a/tpl/tplimpl/embedded/templates/shortcodes/youtube.html +++ b/tpl/tplimpl/embedded/templates/shortcodes/youtube.html @@ -4,6 +4,6 @@ {{- $id := .Get "id" | default (.Get 0) -}} {{- $class := .Get "class" | default (.Get 1) }}
- +
{{ end -}}