aboutsummaryrefslogtreecommitdiff
path: root/dottydoc
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-05-05 09:33:43 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-08-19 15:37:22 +0200
commitb4622aabd0ebd6929639c9cfcd3c7845a250598f (patch)
treec57d050083a21ba8a3020ecda78b37deb2b04dd5 /dottydoc
parent5c5d54aee133620e7f697aeb65c011f95ac9ab4e (diff)
downloaddotty-b4622aabd0ebd6929639c9cfcd3c7845a250598f.tar.gz
dotty-b4622aabd0ebd6929639c9cfcd3c7845a250598f.tar.bz2
dotty-b4622aabd0ebd6929639c9cfcd3c7845a250598f.zip
Fix root-package finding in comment-parser
Diffstat (limited to 'dottydoc')
-rw-r--r--dottydoc/jvm/src/dotty/tools/dottydoc/model/CommentParsers.scala11
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