Skip to content

Commit 896746a

Browse files
committed
Add a comment about why we're keeping else: nil
1 parent 23cee9d commit 896746a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/style/blocks.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ defmodule Styler.Style.Blocks do
143143
[head, [do_block, {_, {:__block__, _, []}}]] ->
144144
{:cont, Zipper.replace(zipper, {:if, m, [head, [do_block]]}), ctx}
145145

146+
# We like keeping `else: nil` even if it's the same effect due to the explicitness.
147+
#
146148
# drop `else: nil`
147149
# [head, [do_block, {_, {:__block__, _, [nil]}}]] ->
148150
# {:cont, Zipper.replace(zipper, {:if, m, [head, [do_block]]}), ctx}

0 commit comments

Comments
 (0)