Skip to content

Commit 2b682b8

Browse files
committed
Do not include separator to post comment
This prevents the trailing `;` on use item to be treated as comment.
1 parent a8022f3 commit 2b682b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lists.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,8 @@ where
619619

620620
let post_snippet_trimmed = if post_snippet.starts_with(|c| c == ',' || c == ':') {
621621
post_snippet[1..].trim_matches(white_space)
622+
} else if post_snippet.starts_with(self.separator) {
623+
post_snippet[self.separator.len()..].trim_matches(white_space)
622624
} else if post_snippet.ends_with(',') {
623625
post_snippet[..(post_snippet.len() - 1)].trim_matches(white_space)
624626
} else {

0 commit comments

Comments
 (0)