Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syntax: allow escaped newlines to precede unquoted words again
As part of fixing #832, to prevent breaking some programs with escaped newlines, I went slightly too far with the tightening of the rules. The input script foo <<< \ "bar baz" would now reformat as foo <<< "\ bar baz" The script is functionally the same, but it looks objectively worse. It is harmless to allow a leading escaped newline when not quoted, as it doesn't break any programs nor result in worse formatting. Note that the script foo=\ bar will still reformat as `foo=bar`, so in that case we keep the recent change in behavior. That case is different, as we can't safely indent the continuing line - thus we can't produce good formatting unless we join the lines. While here, remove incomplete code that I had left commented out in the last patch, and then forgot to remove before merging. Fixes #873.
- Loading branch information