Merge pull request #698 from genotrance/issue640

Fix #640 - strip out blank spaces
This commit is contained in:
Dominik Picheta 2019-09-04 23:12:53 +02:00 • committed by GitHub
commit 1af4505219
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -212,7 +212,10 @@ proc multiSplit(s: string): seq[string] =
result.del(i) result.del(i)
# Huh, nothing to return? Return given input. # Huh, nothing to return? Return given input.
if len(result) < 1: if len(result) < 1:
if s.strip().len != 0:
return @[s] return @[s]
else:
return @[]
proc readPackageInfoFromNimble(path: string; result: var PackageInfo) = proc readPackageInfoFromNimble(path: string; result: var PackageInfo) =
var fs = newFileStream(path, fmRead) var fs = newFileStream(path, fmRead)