We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee0b6a7 commit e6c288eCopy full SHA for e6c288e
src/comment.rs
@@ -365,7 +365,11 @@ fn identify_comment(
365
trim_left_preserve_layout(first_group, shape.indent, config)?
366
} else if !config.normalize_comments()
367
&& !config.wrap_comments()
368
- && !config.format_code_in_doc_comments()
+ && !(
369
+ // `format_code_in_doc_comments` should only take effect on doc comments,
370
+ // so we only consider it when this comment block is a doc comment block.
371
+ is_doc_comment && config.format_code_in_doc_comments()
372
+ )
373
{
374
light_rewrite_comment(first_group, shape.indent, config, is_doc_comment)
375
} else {
0 commit comments