Do not include separator to post comment
This prevents the trailing `;` on use item to be treated as comment.
This commit is contained in:
parent
a8022f3862
commit
2b682b8ed5
@ -619,6 +619,8 @@ fn next(&mut self) -> Option<Self::Item> {
|
||||
|
||||
let post_snippet_trimmed = if post_snippet.starts_with(|c| c == ',' || c == ':') {
|
||||
post_snippet[1..].trim_matches(white_space)
|
||||
} else if post_snippet.starts_with(self.separator) {
|
||||
post_snippet[self.separator.len()..].trim_matches(white_space)
|
||||
} else if post_snippet.ends_with(',') {
|
||||
post_snippet[..(post_snippet.len() - 1)].trim_matches(white_space)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user