Fix issue with extra semicolon when import comment preceeds semicolon
This commit is contained in:
parent
1340fc412a
commit
c7c57f8a16
@ -637,7 +637,7 @@ pub(crate) fn extract_post_comment(
|
|||||||
post_snippet.trim_matches(white_space)
|
post_snippet.trim_matches(white_space)
|
||||||
}
|
}
|
||||||
// not comment or over two lines
|
// not comment or over two lines
|
||||||
else if post_snippet.ends_with(',')
|
else if post_snippet.ends_with(separator)
|
||||||
&& (!post_snippet.trim().starts_with("//") || post_snippet.trim().contains('\n'))
|
&& (!post_snippet.trim().starts_with("//") || post_snippet.trim().contains('\n'))
|
||||||
{
|
{
|
||||||
post_snippet[..(post_snippet.len() - 1)].trim_matches(white_space)
|
post_snippet[..(post_snippet.len() - 1)].trim_matches(white_space)
|
||||||
|
Loading…
Reference in New Issue
Block a user