Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bram209 committed Sep 6, 2024
1 parent 811bad2 commit 0d22647
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions printer/src/algorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ impl Printer {

fn print_indent(&mut self) {
let (tabs, spaces) = if self.settings.hard_tabs {
// Note: we have to print the remainder in spaces, as pending_indentation does not only consist of tabs,
// but blank space of any inconsistent break, which could be a single space too, see `print_break` for implementation details.
// Note: we have to print the remainder in spaces, as pending_indentation consint of _any_ breakable token
// including break tokens with never_break set to 'true', meaning that indentation (e.g. a single space) can be printed in the middle of a line as well.
let tabs = self.pending_indentation / self.settings.tab_spaces as usize;
let remainder = self.pending_indentation % self.settings.tab_spaces as usize;
(tabs, remainder)
Expand Down

0 comments on commit 0d22647

Please sign in to comment.