Merge branch 'master' into ignore-leading-whitespace

This commit is contained in:
John Barton
2019-02-04 15:28:23 +11:00
committed by GitHub
2 changed files with 10 additions and 0 deletions

View File

@ -258,6 +258,9 @@ func parseLine(line string, envMap map[string]string) (key string, value string,
}
key = strings.TrimSpace(key)
re := regexp.MustCompile(`^\s*(?:export\s+)?(.*?)\s*$`)
key = re.ReplaceAllString(splitString[0], "$1")
// Parse the value
value = parseValue(splitString[1], envMap)
return