diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala | 16 |
1 files changed, 15 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 e3da8bddea..34e2f7bc53 100644 --- a/src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala +++ b/src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala @@ -116,11 +116,25 @@ abstract class HtmlPage extends Page { thisPage => case Superscript(in) => <sup>{ inlineToHtml(in) }</sup> case Subscript(in) => <sub>{ inlineToHtml(in) }</sub> case Link(raw, title) => <a href={ raw }>{ inlineToHtml(title) }</a> - case EntityLink(entity) => templateToHtml(entity) case Monospace(in) => <code>{ inlineToHtml(in) }</code> case Text(text) => xml.Text(text) case Summary(in) => inlineToHtml(in) case HtmlTag(tag) => xml.Unparsed(tag) + case EntityLink(target, template) => template() match { + case Some(tpl) => + templateToHtml(tpl) + case None => + xml.Text(target) + } + } + + def typeToHtml(tpes: List[model.TypeEntity], hasLinks: Boolean): NodeSeq = tpes match { + case Nil => + sys.error("Internal Scaladoc error") + case List(tpe) => + typeToHtml(tpe, hasLinks) + case tpe :: rest => + typeToHtml(tpe, hasLinks) ++ scala.xml.Text(" with ") ++ typeToHtml(rest, hasLinks) } def typeToHtml(tpe: model.TypeEntity, hasLinks: Boolean): NodeSeq = { |