From bf5f02a9e72abbb80c66af38636c13a99363ad78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorben=20G=C3=BCnther?= Date: Fri, 7 Aug 2020 14:58:18 +0200 Subject: [PATCH] stylesets: only accept comment char after whitespace Without the option SpaceBeforeInlineComment set, go-ini will parse just a single " This lead to people being unable to specify hex color codes --- config/style.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/style.go b/config/style.go index f159be3..9a8a00f 100644 --- a/config/style.go +++ b/config/style.go @@ -352,7 +352,10 @@ func (ss *StyleSet) LoadStyleSet(stylesetName string, stylesetDirs []string) err return err } - file, err := ini.Load(filepath) + var options ini.LoadOptions + options.SpaceBeforeInlineComment = true + + file, err := ini.LoadSources(options, filepath) if err != nil { return err }