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 @@ -47,13 +47,14 @@ trait SiteRenderer(using DocContext) extends Locations:
47
47
)
48
48
def asStaticSite : Option [String ] = tryAsDri(str)
49
49
def asApiLink : Option [String ] =
50
- {
51
- val strWithoutHtml = str.stripSuffix(" .html" ).stripPrefix(" /" )
50
+ val strWithoutHtml = if str.endsWith(" $.html" ) then
51
+ str.stripSuffix(" $.html" )
52
+ else
53
+ str.stripSuffix(" .html" )
52
54
val sourceDir = Paths .get(" src" , " main" , " scala" )
53
55
val scalaPath = sourceDir.resolve(s " $strWithoutHtml.scala " )
54
56
val scalaDirPath = sourceDir.resolve(strWithoutHtml)
55
57
Option .when(Files .exists(scalaPath)|| Files .exists(scalaDirPath))(resolveLink(pageDri, str))
56
- }
57
58
58
59
/* Link resolving checks performs multiple strategies with following priority:
59
60
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