From 7c52dda2a21312c17584c264c85dddb0a7150157 Mon Sep 17 00:00:00 2001 From: Vlad Ureche Date: Fri, 18 Apr 2014 02:52:16 +0200 Subject: SI-8514 Remove scaladoc html inconsistencies Some classes only got inline comments instead of getting the full comment. --- src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala | 3 --- test/scaladoc/resources/SI-8514.scala | 10 ++++++++++ test/scaladoc/scalacheck/HtmlFactoryTest.scala | 14 ++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 test/scaladoc/resources/SI-8514.scala diff --git a/src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala b/src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala index 26ee005d3e..11a962038a 100644 --- a/src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala +++ b/src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala @@ -306,9 +306,6 @@ class Template(universe: doc.Universe, generator: DiagramGenerator, tpl: DocTemp
{ memberToCommentBodyHtml(mbr, inTpl, isSelf = true) }
- case dte: DocTemplateEntity if mbr.comment.isDefined => - // comment of inner, documented class (only short comment, full comment is on the class' own page) - memberToInlineCommentHtml(mbr, isSelf) case _ => // comment of non-class member or non-documentented inner class val commentBody = memberToCommentBodyHtml(mbr, inTpl, isSelf = false) diff --git a/test/scaladoc/resources/SI-8514.scala b/test/scaladoc/resources/SI-8514.scala new file mode 100644 index 0000000000..4c5476604b --- /dev/null +++ b/test/scaladoc/resources/SI-8514.scala @@ -0,0 +1,10 @@ +package a { + class DeveloperApi extends scala.annotation.StaticAnnotation + + /** Some doc here */ + @DeveloperApi + class A + + @DeveloperApi + class B +} diff --git a/test/scaladoc/scalacheck/HtmlFactoryTest.scala b/test/scaladoc/scalacheck/HtmlFactoryTest.scala index 56328ea875..3ee8fd9303 100644 --- a/test/scaladoc/scalacheck/HtmlFactoryTest.scala +++ b/test/scaladoc/scalacheck/HtmlFactoryTest.scala @@ -740,5 +740,19 @@ object Test extends Properties("HtmlFactory") { case node: scala.xml.Node => true case _ => false } + + property("SI-8514: No inconsistencies") = + checkText("SI-8514.scala")( + (Some("a/package"), + """class A extends AnyRef + Some doc here + Some doc here + Annotations @DeveloperApi() + """, true), + (Some("a/package"), + """class B extends AnyRef + Annotations @DeveloperApi() + """, true) + ) } } -- cgit v1.2.3