aboutsummaryrefslogtreecommitdiff
path: root/doc-tool/src/dotty/tools/dottydoc/staticsite
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-01-16 20:29:25 +0100
committerFelix Mulder <felix.mulder@gmail.com>2017-01-31 14:32:37 +0100
commit9a581bc15aa300f665428c804611453609955f60 (patch)
tree122c3ae291a6d277e02a4545852a798deecf7181 /doc-tool/src/dotty/tools/dottydoc/staticsite
parent72720f0780e95b6b341f46679d20b56fcef8b85a (diff)
downloaddotty-9a581bc15aa300f665428c804611453609955f60.tar.gz
dotty-9a581bc15aa300f665428c804611453609955f60.tar.bz2
dotty-9a581bc15aa300f665428c804611453609955f60.zip
Improve member lookup
Diffstat (limited to 'doc-tool/src/dotty/tools/dottydoc/staticsite')
-rw-r--r--doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala b/doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala
index 72fd8c2a5..92fd95d09 100644
--- a/doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala
+++ b/doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala
@@ -135,7 +135,7 @@ case class Site(val root: JFile, val documentation: Map[String, Package]) extend
/** Generate HTML for the API documentation */
def generateApiDocs(outDir: JFile = new JFile(root.getAbsolutePath + "/_site"))(implicit ctx: Context): this.type =
createOutput(outDir) {
- def genDoc(e: model.Entity) = {
+ def genDoc(e: model.Entity): Unit = {
// Suffix is index.html for packages and therefore the additional depth
// is increased by 1
val (suffix, offset) =
@@ -150,11 +150,14 @@ case class Site(val root: JFile, val documentation: Map[String, Package]) extend
val source = new ByteArrayInputStream(rendered.getBytes(StandardCharsets.UTF_8))
Files.copy(source, target, REPLACE_EXISTING)
+
+ // Generate docs for nested objects/classes:
+ e.children.foreach(genDoc)
}
documentation.values.foreach { pkg =>
genDoc(pkg)
- pkg.members.filterNot(_.kind == "package").map(genDoc)
+ pkg.members.filterNot(_.kind == "package").foreach(genDoc)
}
}