remove trim() on comments (to keep comment indentation)

This commit is contained in:
xdrm-brackets 2018-11-12 15:38:43 +01:00
parent 73b953c35b
commit 69f7cb47b8
2 changed files with 10 additions and 10 deletions

View File

@ -74,10 +74,10 @@ func (d *decoder) Decode(v interface{}) error {
// 2. comment // 2. comment
if line[0] == '#' { if line[0] == '#' {
l.Type = COMMENT l.Type = COMMENT
l.Components = []string{strings.Trim(line[1:], " \t")} l.Components = []string{line[1:]}
} else if line[0] == ';' { } else if line[0] == ';' {
l.Type = COLONCOMMENT l.Type = COLONCOMMENT
l.Components = []string{strings.Trim(line[1:], " \t")} l.Components = []string{line[1:]}
} else if line[0] == '}' { } else if line[0] == '}' {
l.Type = SECTIONEND l.Type = SECTIONEND
if len(stack) < 1 { if len(stack) < 1 {