Originally posted by **antichris** April 3, 2022
Is there a specific design reason why the space preceding a comment is removed when it follows an open parenthesis, or is it by accident?
Given the input
```sh
#!/bin/sh
foo() { ## (bar, [baz])
:
} ## qux
corge() ( ## (grault, [garply])
:
) ## waldo
_=$( ## lorem ipsum
:
) ## dolor sit amet
```
`shfmt` yields
```sh
#!/bin/sh
foo() { ## (bar, [baz])
:
} ## qux
corge() (## (grault, [garply])
:
) ## waldo
_=$(## lorem ipsum
:
) ## dolor sit amet
```
Discussed in https://github.com/mvdan/sh/discussions/838