diff options
Diffstat (limited to 'helpers/pygments.go')
-rw-r--r-- | helpers/pygments.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/helpers/pygments.go b/helpers/pygments.go index 64c5b3ea8..0fe1e7592 100644 --- a/helpers/pygments.go +++ b/helpers/pygments.go @@ -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 == "" { |