Skip to content

Commit

Permalink
Format.
Browse files Browse the repository at this point in the history
  • Loading branch information
petervdonovan committed Sep 3, 2023
1 parent a519b89 commit 2b5d2c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/main/java/org/lflang/ast/ToLf.java
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,10 @@ public MalleableString caseCode(Code code) {
if (content.lines().count() > 1 || content.contains("#") || content.contains("//")) {
return multilineRepresentation;
}
if (callStack.stream().anyMatch(it -> it instanceof Reaction || it instanceof Preamble || it instanceof Method) && !content.isBlank()) {
if (callStack.stream()
.anyMatch(
it -> it instanceof Reaction || it instanceof Preamble || it instanceof Method)
&& !content.isBlank()) {
return MalleableString.anyOf(multilineRepresentation);
}
return MalleableString.anyOf(singleLineRepresentation, multilineRepresentation);
Expand Down

0 comments on commit 2b5d2c4

Please sign in to comment.