Skip to content

Commit

Permalink
fixed: section on first line
Browse files Browse the repository at this point in the history
  • Loading branch information
panorix committed Sep 14, 2021
1 parent 4ebfa71 commit df8e78a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions public.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ func (c *Config) GetConfig() {
linex := strings.Split(string(f), "\n")
var line []string

// Begin with a blank line. If the frist section is on the first line,
// it may be skipped.
if linex[0] != "" && linex[0] != "#" {
line = append(line, "")
}

// Put the continuation of lines together.
// Also remove tabs and trime lines.
for i := 0; i < len(linex); i++ {
Expand Down

0 comments on commit df8e78a

Please sign in to comment.