Skip to content

Commit

Permalink
fix formatter correctness for negatives sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikalii committed Sep 22, 2024
1 parent 002274a commit cf3b373
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,9 @@ impl<'a> Formatter<'a> {
}
};
if formatted.starts_with(|c: char| c.is_ascii_digit())
&& (self.output.ends_with(|c: char| c.is_ascii_digit())
&& (self
.output
.ends_with(|c: char| c.is_ascii_digit() || c == '¯')
|| self.output.ends_with('.')
&& (self.output.chars().nth_back(1))
.is_some_and(|c| c.is_ascii_digit()))
Expand Down
3 changes: 3 additions & 0 deletions todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

- 0.13
- `base` tweak
- `anti` modifier
- `un on drop`
- Non-scalar `fill take`
- Update language tour
- Update design page
- Sound easter egg
Expand Down

0 comments on commit cf3b373

Please sign in to comment.