aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-27 08:21:04 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-27 08:21:04 +0000
commitffcf61884245ca515f08f8685dc324b9db727e53 (patch)
tree99fe4420fe14a036323efe553e609268929df599 /crates/ra_hir/src
parent2577a65684a61fe8ef9159809ca5352c9ac2e61d (diff)
parenta89206795140209b816eb8e91fa3f1e1d6509269 (diff)
Merge #662
662: Preserve indentation in doc comments r=matklad a=kjeremy Fixes #502 Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/docs.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/ra_hir/src/docs.rs b/crates/ra_hir/src/docs.rs
index b1b47af9e..5db72c08a 100644
--- a/crates/ra_hir/src/docs.rs
+++ b/crates/ra_hir/src/docs.rs
@@ -27,10 +27,5 @@ pub trait Docs {
27} 27}
28 28
29pub(crate) fn docs_from_ast(node: &impl ast::DocCommentsOwner) -> Option<Documentation> { 29pub(crate) fn docs_from_ast(node: &impl ast::DocCommentsOwner) -> Option<Documentation> {
30 let comments = node.doc_comment_text(); 30 node.doc_comment_text().map(|it| Documentation::new(&it))
31 if comments.is_empty() {
32 None
33 } else {
34 Some(Documentation::new(&comments))
35 }
36} 31}