]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
tpl/tplimpl: Remove leading whitespaces produced by Youtube shortcode
authorAlex Shpak <alex-shpak@users.noreply.github.com>
Thu, 30 Jan 2025 23:56:12 +0000 (00:56 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 31 Jan 2025 08:29:10 +0000 (09:29 +0100)
tpl/tplimpl/embedded/templates/shortcodes/youtube.html
tpl/tplimpl/shortcodes_integration_test.go

index b61c6130a3b51d7c8cf57f42967c3285f04df2a3..afb1d132fc9b785144c511a2684fa0d72a0c5782 100644 (file)
@@ -102,7 +102,7 @@ Renders an embedded YouTube video.
     {{- $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 -}}
index 55e850f265dae7676ef315ca40dfb43e326e82e4..0578e2d8b56313fa409fd740dac688b0ea30212c 100644 (file)
@@ -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")
 }