fix quote minify being applied on heredocuments
This commit is contained in:
parent
8c3d693182
commit
66b4aaa153
1 changed files with 15 additions and 0 deletions
|
|
@ -216,6 +216,21 @@ bool r_minify_useless_quotes(_obj* in)
|
||||||
//if()
|
//if()
|
||||||
}
|
}
|
||||||
}; break;
|
}; break;
|
||||||
|
case _obj::_redirect: {
|
||||||
|
redirect* t = dynamic_cast<redirect*>(in);
|
||||||
|
if(t->here_document != nullptr)
|
||||||
|
{
|
||||||
|
minify_quotes(t->target);
|
||||||
|
for(auto it: t->here_document->sa)
|
||||||
|
{
|
||||||
|
if(it->type!=_obj::subarg_string) {
|
||||||
|
minify_quotes(it);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// don't recurse on the rest
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue