beautysh
beautysh copied to clipboard
mangles indentation after multiline strings with trailing whitespace
So strange! Works if I remove the space at the end of the string.
$ scripts/beautysh.py - <<EOF
> #!/bin/bash
> VAR="
> text "
>
> if true; then
> echo should be indented
> fi
> EOF
#!/bin/bash
VAR="
text "
if true; then
echo should be indented
fi
Also occurs with variables ending with a newline.
$ scripts/beautysh.py - <<EOF
> #!/bin/bash
> VAR="
> "
>
> if true; then
> echo should be indented
> fi
> EOF
#!/bin/bash
VAR="
"
if true; then
echo should be indented
fi