Closed andreykaipov closed 1 year ago
Oh no, sorry this is embarrassing... I foolishly was only running go test ./... -run=TestPrintMinify
during my testing...
This change as it is breaks a few other wacky cases, like:
foo <<EOF | $(bar)
3
EOF
I did some more digging through the code to see if I can satisfy both (the existing test case of a subshell after the beginning heredoc word, and the new one I added where the heredoc is within a subshell), but I think it would involve a new printer field to keep track of if we're in a heredoc or not.
Thanks for the PR! I did see it, I just haven't had the time to sit down and debug what's going on :)
Finally figured it out, it was a bit subtle :) I also noticed that the escaped newlines right before <<
weren't necessary with the minify mode, that's fixed as well. Fix coming shortly, and I'll credit you for the test cases. Thank you!
Oh - thanks! Sorry this got lost in the inbox. Time sure does fly. Thanks so much! Really appreciate you and this project! 🥳
Fixes https://github.com/mvdan/sh/issues/923 😄