Skip to content

Commit 8cc236d

Browse files
committed
Remove bogus split into lines inside a single comment block
We had wrongly assumed that the comment blocks inside paragraphs correspond to the different lines, but an expression such as `<branchname>@{upstream}` makes clang return each symbol in its own block. Adding newlines between each of them makes us render bad data.
1 parent 0574a3d commit 8cc236d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/docurium/docparser.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ def extract_function_args(cursor, cmt)
149149

150150
def extract_subject_desc(comment)
151151
subject = comment.child.text
152-
desc = (comment.find_all { |cmt| cmt.kind == :comment_paragraph }).drop(1).map(&:text).join("\n\n")
152+
paras = comment.find_all { |cmt| cmt.kind == :comment_paragraph }.drop(1).map { |p| p.map(&:text).join() }
153+
desc = paras.join("\n\n")
153154
return subject, desc
154155
end
155156

0 commit comments

Comments
 (0)