Merge pull request #246 from player-03/master
Merge consecutive arguments that don't start with -
This commit is contained in:
@@ -67,10 +67,9 @@ class FlashPlatform extends PlatformTarget {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hxml = StringTools.replace (hxml, "\n", " ");
|
|
||||||
hxml = StringTools.trim (hxml);
|
hxml = StringTools.trim (hxml);
|
||||||
|
|
||||||
var args = hxml.split (" ");
|
var args = new EReg ("\\s+", "g").split (hxml);
|
||||||
var strip;
|
var strip;
|
||||||
|
|
||||||
while ((strip = args.indexOf ("-swf-header")) > -1) {
|
while ((strip = args.indexOf ("-swf-header")) > -1) {
|
||||||
@@ -79,6 +78,23 @@ class FlashPlatform extends PlatformTarget {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var index = 1;
|
||||||
|
|
||||||
|
while (index < args.length) {
|
||||||
|
|
||||||
|
if (!StringTools.startsWith (args[index - 1], "-") && !StringTools.startsWith (args[index], "-")) {
|
||||||
|
|
||||||
|
args[index - 1] += " " + args[index];
|
||||||
|
args.splice (index, 1);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
index++;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (PlatformHelper.hostPlatform != Platform.WINDOWS) {
|
if (PlatformHelper.hostPlatform != Platform.WINDOWS) {
|
||||||
|
|
||||||
for (i in 0...args.length) {
|
for (i in 0...args.length) {
|
||||||
@@ -298,4 +314,4 @@ class FlashPlatform extends PlatformTarget {
|
|||||||
@ignore public override function trace ():Void {}
|
@ignore public override function trace ():Void {}
|
||||||
@ignore public override function uninstall ():Void {}
|
@ignore public override function uninstall ():Void {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user