aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
authorJeremy Kolb <[email protected]>2019-01-26 14:55:30 +0000
committerJeremy Kolb <[email protected]>2019-01-26 14:55:30 +0000
commite9e0ea03986294f58c371d0329926709ae2f164c (patch)
treefc12ba36e1c2a2806424e0be509339855886dd20 /crates/ra_syntax/src
parent8c08b6825ec961af8bc485f729eb68f69a56e7aa (diff)
Do not unconditionally trim comments
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/ast.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index 74a45f52f..cdfb9c523 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -123,8 +123,7 @@ pub trait DocCommentsOwner: AstNode {
123 .map(|comment| { 123 .map(|comment| {
124 let prefix_len = comment.prefix().len(); 124 let prefix_len = comment.prefix().len();
125 125
126 // Strip leading and trailing whitespace 126 let line = comment.text().as_str();
127 let line = comment.text().as_str().trim();
128 127
129 // Determine if the prefix or prefix + 1 char is stripped 128 // Determine if the prefix or prefix + 1 char is stripped
130 let pos = if line 129 let pos = if line