You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The comment style detection (i.e. `comment_style`) checks the start of a
line to determine the style, so it will misidentify lines starting with
spaces, e.g. ` //# some content` would be identified as
`CommentStyle::DoubleSlash` and not `CommentStyle::Custom("//# ")`
resulting in it determining there to be a comment of `""`, which it then
indents and appends a `\n` before writing back the original comment.
Fix this by trimming the line before trying to identify its style.
Fixes: #6612
0 commit comments