@@ -17,7 +17,7 @@ import scala.util.matching._
1717val UnresolvedLocationLink = " #"
1818
1919trait Locations (using ctx : DocContext ):
20- def members : Map [DRI , Member ]
20+ def effectiveMembers : Map [DRI , Member ]
2121
2222 var cache = new JHashMap [DRI , Seq [String ]]()
2323
@@ -48,7 +48,7 @@ trait Locations(using ctx: DocContext):
4848 UnresolvedLocationLink
4949
5050 def pathToPage (from : DRI , to : DRI ): String =
51- if to.isStaticFile || members .contains(to) then
51+ if to.isStaticFile || effectiveMembers .contains(to) then
5252 val anchor = if to.anchor.isEmpty then " " else " #" + to.anchor
5353 pathToRaw(rawLocation(from), rawLocation(to)) + " .html" + anchor
5454 else
@@ -63,6 +63,7 @@ trait Locations(using ctx: DocContext):
6363
6464
6565 def pathToRaw (from : Seq [String ], to : Seq [String ]): String =
66+ import dotty .tools .scaladoc .util .Escape ._
6667 val fromDir = from.dropRight(1 )
6768 val commonPaths = to.zip(fromDir).takeWhile{ case (a, b) => a == b }.size
6869
@@ -72,7 +73,7 @@ trait Locations(using ctx: DocContext):
7273 case Nil => to.lastOption.fold(Seq (" index" ))(" .." :: _ :: Nil )
7374 case l => l
7475
75- ( contextPath ++ nodePath).mkString(" /" )
76+ escapeUrl(( contextPath ++ nodePath).mkString(" /" ) )
7677
7778 def resolveRoot (from : Seq [String ], to : String ): String =
7879 pathToRaw(from, to.split(" /" ).toList)
0 commit comments