aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Analysis/CommentsAPI.kt12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Analysis/CommentsAPI.kt b/src/Analysis/CommentsAPI.kt
index 03b1911c..6bdc3716 100644
--- a/src/Analysis/CommentsAPI.kt
+++ b/src/Analysis/CommentsAPI.kt
@@ -30,14 +30,10 @@ fun KDoc?.extractText(): String {
return ""
val lines = text.replace("\r", "").split("\n")
return lines.map {
- val comment = it.trim()
- .dropWhile { it == '/' }
- .dropWhile { it == '*' }
- .dropWhile { it == '/' }
- .trim()
- if (comment.endsWith("*/"))
- comment.substring(0, comment.length - 2).trim()
+ val comment = it.trim().dropWhile { it == '/' || it == '*'}
+ (if (comment.endsWith("*/"))
+ comment.substring(0, comment.length - 2)
else
- comment
+ comment).trim()
}.filter { it.any() }.join("\n")
} \ No newline at end of file