mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-11 23:24:26 +02:00
more quote stuff thanks nikita
This commit is contained in:
parent
46632988cf
commit
30e8885a0f
1 changed files with 2 additions and 7 deletions
|
@ -269,14 +269,9 @@ OptionParser.prototype.getMasterOptionMap = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
OptionParser.prototype.explodeAndSet = function() {
|
OptionParser.prototype.explodeAndSet = function() {
|
||||||
// split on spaces, except when inside quotes, and strip quotes after.
|
// split on spaces, except when inside quotes
|
||||||
// for some reason the regex includes the quotes even if i move the parantheses
|
|
||||||
// inside
|
|
||||||
var exploded = this.rawOptions.match(/('.*?'|".*?"|\S+)/g) || [];
|
var exploded = this.rawOptions.match(/('.*?'|".*?"|\S+)/g) || [];
|
||||||
_.each(exploded, function(part, i) {
|
|
||||||
exploded[i] = part.replace(/^['"]|['"]$/g, '');
|
|
||||||
console.log(exploded[i]);
|
|
||||||
});
|
|
||||||
|
|
||||||
for (var i = 0; i < exploded.length; i++) {
|
for (var i = 0; i < exploded.length; i++) {
|
||||||
var part = exploded[i];
|
var part = exploded[i];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue