-
-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syntax: use fewer newlines in heredocs with minify
Given the shell a=$( cat <<EOF hello EOF ) We would format it into a=$(cat \ <<EOF) hello EOF First, this makes bash unhappy, as it wants to find the closing EOF before we close the command substitution. Teach rightParen to use a newline if there are any pending heredocs, even if we're minifying. Second, the escaped newline before the redirect is unnecessary. Now, we format the shell into a=$(cat <<EOF hello EOF ) Thanks to Andrey Kaipov for the report and test cases. Fixes #923.
- Loading branch information
1 parent
a8d7768
commit ca2088c
Showing
2 changed files
with
25 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters