From 5aac87bda6849787313212d7373871cb5bd6c041 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Mon, 30 Oct 2017 23:28:34 +0300 Subject: [PATCH] handle dos line endings in config files --- scan.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scan.go b/scan.go index 622e20fa..6dbecedc 100644 --- a/scan.go +++ b/scan.go @@ -178,6 +178,9 @@ scan: s.tok = string(s.buf[beg:s.off]) s.cmd = false s.sem = true + case s.chr == '\r': + s.next() + goto scan case s.chr == '\n': if s.sem { s.typ = tokenSemicolon