diff options
author | Kato Kazuyoshi <kato.kazuyoshi@gmail.com> | 2011-02-17 14:21:05 +0000 |
---|---|---|
committer | Kato Kazuyoshi <kato.kazuyoshi@gmail.com> | 2011-02-17 14:21:05 +0000 |
commit | 5ba01cd7c8da4109af4c1724084404d90c55339b (patch) | |
tree | ac509534af69138bcfc38edcd32a5858ef9c79c6 /src/compiler | |
parent | 9f4c747c6d1bd866aead90d74ab56cfceb877f6e (diff) | |
download | scala-5ba01cd7c8da4109af4c1724084404d90c55339b.tar.gz scala-5ba01cd7c8da4109af4c1724084404d90c55339b.tar.bz2 scala-5ba01cd7c8da4109af4c1724084404d90c55339b.zip |
[scaladoc] Closes #3681. Review by dubochet.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala b/src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala index 645f06e8ac..95016099ff 100644 --- a/src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala +++ b/src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala @@ -206,10 +206,18 @@ abstract class HtmlPage { thisPage => case tpe :: tpes => typeToHtml(tpe, hasLinks) ++ sep ++ typesToHtml(tpes, hasLinks, sep) } + def hasPage(e: DocTemplateEntity) = { + e.isPackage || e.isTrait || e.isClass || e.isObject || e.isCaseClass + } + /** Returns the HTML code that represents the template in `tpl` as a hyperlinked name. */ def templateToHtml(tpl: TemplateEntity) = tpl match { case dTpl: DocTemplateEntity => - <a href={ relativeLinkTo(dTpl) } class="extype" name={ dTpl.qualifiedName }>{ dTpl.name }</a> + if (hasPage(dTpl)) { + <a href={ relativeLinkTo(dTpl) } class="extype" name={ dTpl.qualifiedName }>{ dTpl.name }</a> + } else { + xml.Text(dTpl.name) + } case ndTpl: NoDocTemplate => xml.Text(ndTpl.name) } |