File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
scaladoc/src/dotty/tools/scaladoc Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,12 @@ object ExternalDocLink:
2525 case Failure (e) => fail(mapping, s " Unable to parse $descr. Exception $e occured " )
2626 }
2727
28+ private def stripIndex (url : String ): String = url.stripSuffix(" index.html" ).stripSuffix(" /" ) + " /"
29+
2830 def parseLegacy (mapping : String ): Either [String , ExternalDocLink ] =
2931 mapping.split(" #" ).toList match
3032 case path :: apiUrl :: Nil => for {
31- url <- tryParse(mapping, " url" )(URL (apiUrl))
33+ url <- tryParse(mapping, " url" )(URL (stripIndex( apiUrl) ))
3234 } yield ExternalDocLink (
3335 List (s " ${Regex .quote(path)}.* " .r),
3436 url,
@@ -55,7 +57,7 @@ object ExternalDocLink:
5557 case regexStr :: docToolStr :: urlStr :: rest =>
5658 for {
5759 regex <- tryParse(mapping, " regex" )(regexStr.r)
58- url <- tryParse(mapping, " url" )(URL (urlStr))
60+ url <- tryParse(mapping, " url" )(URL (stripIndex( urlStr) ))
5961 doctool <- doctoolByName(docToolStr)
6062 packageList <- parsePackageList(rest)
6163 } yield ExternalDocLink (
You can’t perform that action at this time.
0 commit comments