summaryrefslogtreecommitdiffstats
path: root/helpers/pygments.go
diff options
context:
space:
mode:
authorAlbert Nigmatzianov <albertnigma@gmail.com>2016-11-07 00:10:32 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-11-07 00:10:32 +0100
commit85a2d81e3c1f62b561e6c2715cc406446879d09e (patch)
tree3ed54195fb0f8283082827a4890a138fca25504d /helpers/pygments.go
parent4b4ab4755339a8c1d034be1f75b323d585dac1df (diff)
commands, tpl: Get rid of repeating viper accesses
* all: Delete some blank lines * commands, tpl: Get rid of repeating viper accesses
Diffstat (limited to 'helpers/pygments.go')
-rw-r--r--helpers/pygments.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/helpers/pygments.go b/helpers/pygments.go
index d729be5dc..7903678b6 100644
--- a/helpers/pygments.go
+++ b/helpers/pygments.go
@@ -42,7 +42,6 @@ func HasPygments() bool {
// Highlight takes some code and returns highlighted code.
func Highlight(code, lang, optsStr string) string {
-
if !HasPygments() {
jww.WARN.Println("Highlighting requires Pygments to be installed and in the path")
return code
@@ -197,7 +196,6 @@ func createOptionsString(options map[string]string) string {
}
func parseDefaultPygmentsOpts() (map[string]string, error) {
-
options := make(map[string]string)
err := parseOptions(options, viper.GetString("pygmentsOptions"))
if err != nil {
@@ -225,7 +223,6 @@ func parseDefaultPygmentsOpts() (map[string]string, error) {
}
func parsePygmentsOpts(in string) (string, error) {
-
options, err := parseDefaultPygmentsOpts()
if err != nil {
return "", err