summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/page/Template.scala13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala
index f7d7b95844..cd733ced9a 100644
--- a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala
+++ b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala
@@ -208,10 +208,15 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage {
if (commentBody.isEmpty)
NodeSeq.Empty
else {
- <xml:group>
- { memberToShortCommentHtml(mbr, isSelf) }
- <div class="fullcomment">{ memberToUseCaseCommentHtml(mbr, isSelf) }{ memberToCommentBodyHtml(mbr, isSelf) }</div>
- </xml:group>
+ val shortComment = memberToShortCommentHtml(mbr, isSelf)
+ val longComment = memberToUseCaseCommentHtml(mbr, isSelf) ++ memberToCommentBodyHtml(mbr, isSelf)
+
+ val includedLongComment = if (shortComment.text.trim == longComment.text.trim)
+ NodeSeq.Empty
+ else
+ <div class="fullcomment">{ longComment }</div>
+
+ shortComment ++ includedLongComment
}
}
}