@@ -17,7 +17,7 @@ import scala.util.matching._
17
17
val UnresolvedLocationLink = " #"
18
18
19
19
trait Locations (using ctx : DocContext ):
20
- def members : Map [DRI , Member ]
20
+ def effectiveMembers : Map [DRI , Member ]
21
21
22
22
var cache = new JHashMap [DRI , Seq [String ]]()
23
23
@@ -48,7 +48,7 @@ trait Locations(using ctx: DocContext):
48
48
UnresolvedLocationLink
49
49
50
50
def pathToPage (from : DRI , to : DRI ): String =
51
- if to.isStaticFile || members .contains(to) then
51
+ if to.isStaticFile || effectiveMembers .contains(to) then
52
52
val anchor = if to.anchor.isEmpty then " " else " #" + to.anchor
53
53
pathToRaw(rawLocation(from), rawLocation(to)) + " .html" + anchor
54
54
else
@@ -63,6 +63,7 @@ trait Locations(using ctx: DocContext):
63
63
64
64
65
65
def pathToRaw (from : Seq [String ], to : Seq [String ]): String =
66
+ import dotty .tools .scaladoc .util .Escape ._
66
67
val fromDir = from.dropRight(1 )
67
68
val commonPaths = to.zip(fromDir).takeWhile{ case (a, b) => a == b }.size
68
69
@@ -72,7 +73,7 @@ trait Locations(using ctx: DocContext):
72
73
case Nil => to.lastOption.fold(Seq (" index" ))(" .." :: _ :: Nil )
73
74
case l => l
74
75
75
- ( contextPath ++ nodePath).mkString(" /" )
76
+ escapeUrl(( contextPath ++ nodePath).mkString(" /" ) )
76
77
77
78
def resolveRoot (from : Seq [String ], to : String ): String =
78
79
pathToRaw(from, to.split(" /" ).toList)
0 commit comments