Don't be greedy.

This commit is contained in:
Roel van Uden 2015-01-24 13:33:40 +01:00
parent b420758104
commit 17b5c8414c

View File

@ -40,7 +40,7 @@ function _split(value) {
inQuote = !inQuote;
}
if (!inQuote && value.charAt(i) === ' ') {
pieces.push(value.substring(previous, i).match(/^"?(.*)"?$/)[1]);
pieces.push(value.substring(previous, i).match(/^"?(.+?)"?$/)[1]);
previous = i + 1;
}
}