Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Prevent slash duplication.

Don't add trailing slash to external doc URL if it already ends with
one.
  • Loading branch information...
commit f628565075a9b3c88fadec21445e2d9f088c9acb 1 parent e927cbc
@vigdorchik vigdorchik authored
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/compiler/scala/tools/nsc/doc/Settings.scala
View
5 src/compiler/scala/tools/nsc/doc/Settings.scala
@@ -249,10 +249,7 @@ class Settings(error: String => Unit, val printMsg: String => Unit = println(_))
}
}
- def appendIndex(url: String): String = {
- val index = "/index.html"
- if (url.endsWith(index)) url else url + index
- }
+ def appendIndex(url: String): String = url.stripSuffix("index.html").stripSuffix("/") + "/index.html"
// Deprecated together with 'docExternalUrls' option.
lazy val extUrlPackageMapping: Map[String, String] = (Map.empty[String, String] /: docExternalUrls.value) {
Please sign in to comment.
Something went wrong with that request. Please try again.