Skip to content

Commit

Permalink
Fix newlines in exptosegment
Browse files Browse the repository at this point in the history
  • Loading branch information
Negabinary committed Nov 19, 2024
1 parent 769cd63 commit e2ddec3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/haz3lcore/pretty/ExpToSegment.re
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ let should_add_space = (s1, s2) =>
| _ when String.starts_with(s2, ~prefix=":") => false
| _ when String.ends_with(s1, ~suffix=" ") => false
| _ when String.starts_with(s2, ~prefix=" ") => false
| _ when String.ends_with(s1, ~suffix="⏎") => false
| _ when String.starts_with(s2, ~prefix="⏎") => false
| _ when String.ends_with(s1, ~suffix="\n") => false
| _ when String.starts_with(s2, ~prefix="\n") => false
| _
when
String.ends_with(s1, ~suffix=")")
&& String.starts_with(s2, ~prefix="(") =>
false
| _ => true
};

Expand Down

0 comments on commit e2ddec3

Please sign in to comment.