summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-04-21 20:56:36 +0200
committerJason Zaugg <jzaugg@gmail.com>2014-04-21 20:56:36 +0200
commit969e22f601d18c76ffbe22d994948874c60ebec0 (patch)
treea3621b81663772ae8a4a7500c3543fc89cf4474c
parent781545287a0d9b2170e1db2402327c649ed26f8b (diff)
parent7c52dda2a21312c17584c264c85dddb0a7150157 (diff)
downloadscala-969e22f601d18c76ffbe22d994948874c60ebec0.tar.gz
scala-969e22f601d18c76ffbe22d994948874c60ebec0.tar.bz2
scala-969e22f601d18c76ffbe22d994948874c60ebec0.zip
Merge pull request #3685 from VladUreche/issue/8514-master
SI-8514 Remove scaladoc html inconsistencies
-rw-r--r--src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala3
-rw-r--r--test/scaladoc/resources/SI-8514.scala10
-rw-r--r--test/scaladoc/scalacheck/HtmlFactoryTest.scala14
3 files changed, 24 insertions, 3 deletions
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 51fc643429..b5a8d1ac36 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
<xml:group>
<div id="comment" class="fullcommenttop">{ memberToCommentBodyHtml(mbr, inTpl, isSelf = true) }</div>
</xml:group>
- 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 4205bad54e..ef70e0bf21 100644
--- a/test/scaladoc/scalacheck/HtmlFactoryTest.scala
+++ b/test/scaladoc/scalacheck/HtmlFactoryTest.scala
@@ -739,6 +739,20 @@ 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)
+ )
}
// SI-8144