Skip to content

Commit

Permalink
fix a couple formatting bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikalii committed Jun 10, 2024
1 parent f83d5bb commit f3aff76
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,11 @@ impl<'a> Formatter<'a> {
.is_some_and(|word| {
matches!(
word.value,
Word::Comment(_) | Word::OutputComment { .. } | Word::MultilineFormatString(_)
Word::Comment(_)
| Word::OutputComment { .. }
| Word::SemanticComment(_)
| Word::MultilineString(_)
| Word::MultilineFormatString(_)
)
});
if lines.len() == 1
Expand Down Expand Up @@ -1267,7 +1271,7 @@ pub(crate) fn word_is_multiline(word: &Word) -> bool {
Word::Comment(_) => true,
Word::Spaces => false,
Word::BreakLine | Word::UnbreakLine => false,
Word::SemanticComment(_) => false,
Word::SemanticComment(_) => true,
Word::OutputComment { .. } => true,
}
}
Expand Down

0 comments on commit f3aff76

Please sign in to comment.