Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/it-gro/hugo-theme-w3css-basic.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-gro <13005925+it-gro@users.noreply.github.com>2021-09-05 11:53:57 +0300
committerit-gro <13005925+it-gro@users.noreply.github.com>2021-09-05 11:53:57 +0300
commit8677b0682b0608a46120ce0cf2a574ffcd5548fc (patch)
tree0db5a33c38306178703102b3ecc143273d3c4015
parente621fe255a43ea8ac5f9ba97366ee2797459dab7 (diff)
Get rid useless ()
-rw-r--r--layouts/shortcodes/highlightfile.html8
-rw-r--r--layouts/shortcodes/readfile.html8
2 files changed, 8 insertions, 8 deletions
diff --git a/layouts/shortcodes/highlightfile.html b/layouts/shortcodes/highlightfile.html
index 20bb0af..d936025 100644
--- a/layouts/shortcodes/highlightfile.html
+++ b/layouts/shortcodes/highlightfile.html
@@ -3,10 +3,10 @@ Highlights file and provides download link.
File should be located either in the same directory or full path should be specified.
-->
-{{- $src := .Get "file" }}
-{{- $lang := .Get "language" | default ("python") }}
-{{- $opt := .Get "opt" | default ("linenos=table") }}
-{{- $theme := .Get "theme" | default ("") }}
+{{- $src := .Get "file" }}
+{{- $lang := .Get "language" | default "python" }}
+{{- $opt := .Get "opt" | default "linenos=table" }}
+{{- $theme := .Get "theme" | default "" }}
{{- if eq $theme "default" -}}
{{ $theme = (default "w3-theme-l3" ($.Site.Param `colorShortcodeHighlightfile`) ) }}
diff --git a/layouts/shortcodes/readfile.html b/layouts/shortcodes/readfile.html
index 8b6f535..cb6a145 100644
--- a/layouts/shortcodes/readfile.html
+++ b/layouts/shortcodes/readfile.html
@@ -8,10 +8,10 @@
{{- $myTheme := `` }}
{{- if .IsNamedParams -}}
- {{- $myFile = default ($myFile ) (.Get `file` ) }}
- {{- $myMarkdownify = default ($myMarkdownify ) (.Get `md` ) }}
- {{- $myHighlightLang = default ($myHighlightLang ) (.Get `hll` ) }}
- {{- $myTheme = default ($myTheme ) (.Get `theme` ) }}
+ {{- $myFile = default $myFile (.Get `file` ) }}
+ {{- $myMarkdownify = default $myMarkdownify (.Get `md` ) }}
+ {{- $myHighlightLang = default $myHighlightLang (.Get `hll` ) }}
+ {{- $myTheme = default $myTheme (.Get `theme` ) }}
{{- else -}}
{{- $myPos := 0}} {{- if gt (len .Params) $myPos }} {{- $myFile = .Get $myPos }} {{- end -}}
{{- $myPos := 1}} {{- if gt (len .Params) $myPos }} {{- $myMarkdownify = .Get $myPos }} {{- end -}}