Skip to content

Commit

Permalink
Wrap code examples in code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed Jul 11, 2023
1 parent 7b2cc9b commit 7c2d38c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/ruff_python_formatter/src/comments/placement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,7 @@ fn handle_comprehension_comment<'a>(
let mut last_end = comprehension.iter.range().end();

for if_node in &comprehension.ifs {
// ```python
// [
// a
// for
Expand All @@ -1352,7 +1353,7 @@ fn handle_comprehension_comment<'a>(
// # above g
// g # g
// ]

// ```
let if_token = find_only_token_in_range(
TextRange::new(last_end, if_node.range().start()),
locator,
Expand Down

0 comments on commit 7c2d38c

Please sign in to comment.