Skip to content

Commit

Permalink
Fix breaking label on attributes inside modules
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Nov 20, 2022
1 parent 81bb3a0 commit e17fe1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions formatTest/typeCheckedTests/expected_output/attributes.rei
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,7 @@ type ttttt = {
x: int,
};

module Foo: {[@someattr]
let foo: int => int;};
module Foo: {
[@someattr]
let foo: int => int;
};
2 changes: 1 addition & 1 deletion src/reason-parser/reason_pprint_ast.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7419,7 +7419,7 @@ let printer = object(self:'self)
~comments:self#comments
s
in
let shouldBreakLabel = if List.length s > 1 then `Always else `Auto in
let shouldBreakLabel = if List.length s > 0 then `Always else `Auto in
label
~indent:0
~break:shouldBreakLabel
Expand Down

0 comments on commit e17fe1b

Please sign in to comment.