File tree 1 file changed +4
-3
lines changed
scaladoc/src/dotty/tools/scaladoc/renderers 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,14 @@ trait SiteRenderer(using DocContext) extends Locations:
48
48
)
49
49
def asStaticSite : Option [String ] = tryAsDri(str)
50
50
def asApiLink : Option [String ] =
51
- {
52
- val strWithoutHtml = str.stripSuffix(" .html" ).stripPrefix(" /" )
51
+ val strWithoutHtml = if str.endsWith(" $.html" ) then
52
+ str.stripSuffix(" $.html" )
53
+ else
54
+ str.stripSuffix(" .html" )
53
55
val sourceDir = Paths .get(" src" , " main" , " scala" )
54
56
val scalaPath = sourceDir.resolve(s " $strWithoutHtml.scala " )
55
57
val scalaDirPath = sourceDir.resolve(strWithoutHtml)
56
58
Option .when(Files .exists(scalaPath)|| Files .exists(scalaDirPath))(resolveLink(pageDri, str))
57
- }
58
59
59
60
/* Link resolving checks performs multiple strategies with following priority:
60
61
1. We check if the link is a valid URL e.g. http://dotty.epfl.ch
You can’t perform that action at this time.
0 commit comments