diff options
-rw-r--r-- | dottydoc/jvm/src/dotty/tools/dottydoc/model/CommentParsers.scala | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/dottydoc/jvm/src/dotty/tools/dottydoc/model/CommentParsers.scala b/dottydoc/jvm/src/dotty/tools/dottydoc/model/CommentParsers.scala index bd9eb87f9..9320bb5fe 100644 --- a/dottydoc/jvm/src/dotty/tools/dottydoc/model/CommentParsers.scala +++ b/dottydoc/jvm/src/dotty/tools/dottydoc/model/CommentParsers.scala @@ -58,11 +58,14 @@ object CommentParsers { var packages: List[String] = Nil for (key <- packs.keys) { - val keyDepth = key.split(".").length + val keyDepth = key.split("\\.").length packages = - if (keyDepth < currentDepth) key :: Nil - else if (keyDepth == currentDepth) key :: packages - else packages + if (keyDepth < currentDepth) { + currentDepth = keyDepth + key :: Nil + } else if (keyDepth == currentDepth) { + key :: packages + } else packages } packages |