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 b316bcc commit a66dbd1Copy full SHA for a66dbd1
crates/ide-assists/src/handlers/convert_comment_block.rs
@@ -164,7 +164,8 @@ pub(crate) fn relevant_line_comments(comment: &ast::Comment) -> Vec<Comment> {
164
//
165
// But since such comments aren't idiomatic we're okay with this.
166
pub(crate) fn line_comment_text(indentation: IndentLevel, comm: ast::Comment) -> Option<String> {
167
- let contents_without_prefix = comm.text().strip_prefix(comm.prefix())?;
+ let text = comm.text();
168
+ let contents_without_prefix = text.strip_prefix(comm.prefix()).unwrap_or(text);
169
let contents = contents_without_prefix.strip_prefix(' ').unwrap_or(contents_without_prefix);
170
171
// Don't add the indentation if the line is empty
0 commit comments