pythonizer icon indicating copy to clipboard operation
pythonizer copied to clipboard

Translating a line with multiple bash-style "and"s / "or"s generates hanging indents

Open snoopyjc opened this issue 3 years ago • 2 comments

Translating a line with multiple bash-style "and"s / "or"s generates hanging indents. For example:

      ($ec1 = $ar2equivc{$r1})
       || ($ec1 = $ar2equivc{"$r1:stub"})
       || ($ec1 = $r1);

Leaves the indent level set to 1 afterwards.

snoopyjc avatar Dec 07 '21 03:12 snoopyjc

$delayed_block_closure needs to be incremented, not set to 1, then loop and decrement back to 0 inserting }

snoopyjc avatar Dec 07 '21 03:12 snoopyjc

Fixed in https://github.com/snoopyjc/pythonizer

snoopyjc avatar Feb 07 '22 16:02 snoopyjc