Fixed problems with docs failing to render and included test to validate that behavior

This commit is contained in:
Chadtech 2021-07-03 14:51:40 -04:00
parent 1c06e280b0
commit 62d5633546
8 changed files with 120 additions and 79 deletions

View file

@ -123,7 +123,10 @@ fn detached_docs_from_comments_and_new_lines<'a>(
}
CommentOrNewline::LineComment(_) | CommentOrNewline::Newline => {
detached_docs.push(docs.clone());
if !docs.is_empty() {
detached_docs.push(docs.clone());
}
docs = String::new();
}
}