diff options
author | it-gro <13005925+it-gro@users.noreply.github.com> | 2021-09-05 11:53:57 +0300 |
---|---|---|
committer | it-gro <13005925+it-gro@users.noreply.github.com> | 2021-09-05 11:53:57 +0300 |
commit | 8677b0682b0608a46120ce0cf2a574ffcd5548fc (patch) | |
tree | 0db5a33c38306178703102b3ecc143273d3c4015 | |
parent | e621fe255a43ea8ac5f9ba97366ee2797459dab7 (diff) |
Get rid useless ()
-rw-r--r-- | layouts/shortcodes/highlightfile.html | 8 | ||||
-rw-r--r-- | layouts/shortcodes/readfile.html | 8 |
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 -}} |