diff --git a/internal/editor/editor.go b/internal/editor/editor.go index d173d0a53..2bc3e2591 100644 --- a/internal/editor/editor.go +++ b/internal/editor/editor.go @@ -75,7 +75,9 @@ func readAndStripComments(fname string) (string, error) { s := bufio.NewScanner(f) for s.Scan() { l := s.Text() - l = strings.TrimSpace(strings.Split(l, "#")[0]) + if strings.HasPrefix(strings.TrimSpace(l), "#") { + continue + } if l != "" { result = append(result, l)