Skip to content

Commit

Permalink
Fix: Re-add missing node start positions (#6780)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser authored Aug 23, 2023
1 parent 1e6d118 commit 4bdd99f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/ruff_python_formatter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ where
if self.is_suppressed(node_comments.trailing, f.context()) {
suppressed_node(node.as_any_node_ref()).fmt(f)
} else {
leading_comments(node_comments.leading).fmt(f)?;
write!(
f,
[
leading_comments(node_comments.leading),
source_position(node.start())
]
)?;
self.fmt_fields(node, f)?;
self.fmt_dangling_comments(node_comments.dangling, f)?;

Expand Down

0 comments on commit 4bdd99f

Please sign in to comment.