瀏覽代碼

stricter regexp for Dockerfile line continuations

Jason McVetta 12 年之前
父節點
當前提交
6a4afb7f8e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      buildfile.go

+ 1 - 1
buildfile.go

@@ -459,7 +459,7 @@ func (b *buildFile) commit(id string, autoCmd []string, comment string) error {
 }
 }
 
 
 // Long lines can be split with a backslash
 // Long lines can be split with a backslash
-var lineContinuation = regexp.MustCompile(`\s*\\.*\n`)
+var lineContinuation = regexp.MustCompile(`\s*\\\s*\n`)
 
 
 func (b *buildFile) Build(context io.Reader) (string, error) {
 func (b *buildFile) Build(context io.Reader) (string, error) {
 	// FIXME: @creack any reason for using /tmp instead of ""?
 	// FIXME: @creack any reason for using /tmp instead of ""?