1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

builder: strip blank lines before processing any line continuations.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
This commit is contained in:
Erik Hollensbe 2014-10-15 04:00:17 +00:00
parent dc243c812b
commit a1ef2207dd
3 changed files with 11 additions and 0 deletions

View file

@ -98,6 +98,10 @@ func Parse(rwc io.Reader) (*Node, error) {
scanner := bufio.NewScanner(rwc)
for scanner.Scan() {
if scanner.Text() == "" {
continue
}
line, child, err := parseLine(strings.TrimLeftFunc(scanner.Text(), unicode.IsSpace))
if err != nil {
return nil, err

View file

@ -5,4 +5,10 @@ RUN apt-get \update && \
apt-get \"install znc -y
ADD \conf\\" /.znc
RUN foo \
bar \
baz
CMD [ "\/usr\\\"/bin/znc", "-f", "-r" ]

View file

@ -2,4 +2,5 @@
(maintainer "Erik \\\\Hollensbe <erik@hollensbe.org>\\\"")
(run "apt-get \\update && apt-get \\\"install znc -y")
(add "\\conf\\\\\"" "/.znc")
(run "foo bar baz")
(cmd "/usr\\\"/bin/znc" "-f" "-r")