mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-29 23:20:49 +03:00
all: Apply staticcheck recommendations
This commit is contained in:
parent
3011f36c27
commit
b5f39d23b8
41 changed files with 98 additions and 252 deletions
|
@ -153,7 +153,7 @@ func (h highlighters) pygmentsHighlight(code, lang, optsStr string) (string, err
|
|||
return code, err
|
||||
}
|
||||
|
||||
str := string(normalizeExternalHelperLineFeeds([]byte(out.String())))
|
||||
str := string(normalizeExternalHelperLineFeeds(out.Bytes()))
|
||||
|
||||
str = h.injectCodeTag(str, lang)
|
||||
|
||||
|
@ -235,10 +235,8 @@ func parseOptions(defaults map[string]string, in string) (map[string]string, err
|
|||
in = strings.Trim(in, " ")
|
||||
opts := make(map[string]string)
|
||||
|
||||
if defaults != nil {
|
||||
for k, v := range defaults {
|
||||
opts[k] = v
|
||||
}
|
||||
for k, v := range defaults {
|
||||
opts[k] = v
|
||||
}
|
||||
|
||||
if in == "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue