From 48bdf9ef08590d4099dbe9ce2f9f9318d8ceddc5 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Tue, 21 May 2024 21:31:37 -0700 Subject: [PATCH] Remove newlines from group dict info Signed-off-by: Danila Fedorin --- layouts/shortcodes/codeblock.html | 4 ++-- layouts/shortcodes/codelines.html | 4 ++-- layouts/shortcodes/rawblock.html | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/layouts/shortcodes/codeblock.html b/layouts/shortcodes/codeblock.html index 2055f0f..6261a6b 100644 --- a/layouts/shortcodes/codeblock.html +++ b/layouts/shortcodes/codeblock.html @@ -1,5 +1,5 @@ {{ partial "geturl.html" (dict "scratch" .Scratch "path" (.Get 1) "siteSourceUrl" .Site.Params.siteSourceUrl "submoduleLinks" .Site.Data.submodules) }} -{{ $groupconfig := dict +{{- $groupconfig := dict "url" (.Scratch.Get "bestUrl") "basePath" (.Scratch.Get "bestPath") "path" (.Get 1) @@ -7,5 +7,5 @@ "code" (readFile (printf "code/%s" (.Get 1))) "language" (.Get 0) "opts" "linenos=table" -}} +-}} {{ partial "highlightgroup.html" $groupconfig }} diff --git a/layouts/shortcodes/codelines.html b/layouts/shortcodes/codelines.html index d500d27..5188e01 100644 --- a/layouts/shortcodes/codelines.html +++ b/layouts/shortcodes/codelines.html @@ -23,7 +23,7 @@ {{ with (.Scratch.Get "hidden") }}
{{ . | markdownify }} {{ end }} -{{ $groupconfig := dict +{{- $groupconfig := dict "url" (.Scratch.Get "bestUrl") "basePath" (.Scratch.Get "bestPath") "path" (.Get 1) @@ -33,7 +33,7 @@ "lastLine" (int (.Get 3)) "language" (.Get 0) "opts" (printf "linenos=table,linenostart=%d%s" (.Get 2) (.Scratch.Get "opts")) -}} +-}} {{ partial "highlightgroup.html" $groupconfig }} {{ with (.Scratch.Get "hidden") }}
diff --git a/layouts/shortcodes/rawblock.html b/layouts/shortcodes/rawblock.html index 18d810f..01a42bb 100644 --- a/layouts/shortcodes/rawblock.html +++ b/layouts/shortcodes/rawblock.html @@ -1,9 +1,9 @@ {{ partial "geturl.html" (dict "scratch" .Scratch "path" (.Get 0) "siteSourceUrl" .Site.Params.siteSourceUrl "submoduleLinks" .Site.Data.submodules) }} -{{ $groupconfig := dict +{{- $groupconfig := dict "url" (.Scratch.Get "bestUrl") "basePath" (.Scratch.Get "bestPath") "path" (.Get 0) "comment" ", entire file" "content" (safeHTML (printf "
%s
" (htmlEscape (readFile (printf "code/%s" (.Get 0)))))) -}} +-}} {{ partial "group.html" $groupconfig }}