mirror of
https://codeberg.org/TicklishHoneyBee/CLIte.git
synced 2026-03-11 09:04:37 +00:00
add single quote support to strToArgs
This commit is contained in:
parent
2a91fce083
commit
f70937e91f
1 changed files with 7 additions and 5 deletions
|
|
@ -1371,24 +1371,26 @@ clite.lib = {
|
|||
e = true;
|
||||
}
|
||||
break;
|
||||
case '"':
|
||||
case '`':
|
||||
case '"':
|
||||
case "'":
|
||||
if (!e) {
|
||||
if (!q) {
|
||||
sp = txt[i];
|
||||
q = true;
|
||||
if (sp == '`');
|
||||
if (sp == '`')
|
||||
s += '`';
|
||||
break;
|
||||
}else if (txt[i] == sp) {
|
||||
if (sp == '`');
|
||||
if (sp == '`')
|
||||
s += '`';
|
||||
sp = '';
|
||||
q = false;
|
||||
}
|
||||
}else{
|
||||
s+='"';
|
||||
s += txt[i];
|
||||
e = false;
|
||||
}
|
||||
break;
|
||||
case ' ':
|
||||
if (!q) {
|
||||
parts.push(s);
|
||||
|
|
|
|||
Loading…
Reference in a new issue