From 66b4aaa15393b8481177f600df1fc48cd9dfebec Mon Sep 17 00:00:00 2001 From: zawwz Date: Thu, 8 Jul 2021 14:15:30 +0200 Subject: [PATCH] fix quote minify being applied on heredocuments --- src/minify.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/minify.cpp b/src/minify.cpp index e046c69..d0fabb2 100644 --- a/src/minify.cpp +++ b/src/minify.cpp @@ -216,6 +216,21 @@ bool r_minify_useless_quotes(_obj* in) //if() } }; break; + case _obj::_redirect: { + redirect* t = dynamic_cast(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;