Skip to content

Commit

Permalink
tpl/tplimpl: Remove leading whitespaces produced by Youtube shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-shpak authored and bep committed Jan 31, 2025
1 parent 329b234 commit 13b208e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tpl/tplimpl/embedded/templates/shortcodes/youtube.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
{{- $allow := "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" }}
{{- $referrerpolicy := "strict-origin-when-cross-origin" }}

{{- /* Render. */}}
{{- /* Render. */ -}}
<div
{{- with $class }} class="{{ . }}" {{- end }}
{{- with $divStyle }} style="{{ . | safeCSS }}" {{- end -}}
Expand Down
8 changes: 4 additions & 4 deletions tpl/tplimpl/shortcodes_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -675,12 +675,12 @@ title: p2

b := hugolib.Test(t, files)

b.AssertFileContent("public/p1/index.html", "515600e76b272f51")
b.AssertFileContent("public/p2/index.html", "b5ceeace7dfa797a")
b.AssertFileContent("public/p1/index.html", "a0a6f5ade9cc3a9f")
b.AssertFileContent("public/p2/index.html", "289c655e727e596c")

files = strings.ReplaceAll(files, "privacy.youtube.privacyEnhanced = false", "privacy.youtube.privacyEnhanced = true")

b = hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", "e92c7f4b768d7e23")
b.AssertFileContent("public/p2/index.html", "c384e83e035b71d9")
b.AssertFileContent("public/p1/index.html", "b76d790c20d2bd04")
b.AssertFileContent("public/p2/index.html", "a6db910a9cf54bc1")
}

0 comments on commit 13b208e

Please sign in to comment.