fix quote minify being applied on heredocuments

This commit is contained in:
zawwz 2021-07-08 14:15:30 +02:00
parent 8c3d693182
commit 66b4aaa153

View file

@ -216,6 +216,21 @@ bool r_minify_useless_quotes(_obj* in)
//if()
}
}; 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;
}
return true;