Use Hugo's partial-returning where possible
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
@@ -35,17 +35,17 @@
|
||||
{{- $joinedLines = delimit $lines "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "geturl.html" (dict "scratch" $scratch "path" (.Get 1) "lines" (slice (.Get 2) (.Get 3))) -}}
|
||||
{{- partial "linerangestr.html" (dict "scratch" $scratch "from" (.Get 2) "to" (.Get 3)) -}}
|
||||
{{- $url := partial "geturl.html" (dict "path" (.Get 1) "lines" (slice (.Get 2) (.Get 3))) -}}
|
||||
{{- $comment := partial "linerangestr.html" (dict "from" (.Get 2) "to" (.Get 3)) -}}
|
||||
|
||||
{{- with ($scratch.Get "hidden") -}}
|
||||
<details><summary>{{- . | markdownify -}}</summary>
|
||||
{{- end -}}
|
||||
{{- $groupconfig := dict
|
||||
"url" ($scratch.Get "bestUrl")
|
||||
"basePath" ($scratch.Get "bestPath")
|
||||
"url" $url.url
|
||||
"basePath" $url.basePath
|
||||
"path" (.Get 1)
|
||||
"comment" ($scratch.Get "comment")
|
||||
"comment" $comment
|
||||
"code" $joinedLines
|
||||
"firstLine" (int (.Get 2))
|
||||
"lastLine" (int (.Get 3))
|
||||
|
||||
Reference in New Issue
Block a user