Skip to content

Commit 93b300f

Browse files
committed
Replace occurrences of master to main. Fix Edit button
1 parent 63b838a commit 93b300f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

scaladoc/src/dotty/tools/scaladoc/renderers/HtmlRenderer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ class HtmlRenderer(rootPackage: Member, members: Map[DRI, Member])(using ctx: Do
223223
footer(
224224
div(id := "generated-by")(
225225
span(cls := "footer-text")(raw("Generated by")),
226-
a(href := "https://github.com/lampepfl/dotty/tree/master/scaladoc")(
226+
a(href := "https://github.com/lampepfl/dotty/tree/main/scaladoc")(
227227
img(
228228
src := resolveRoot(link.dri, "images/scaladoc_logo.svg"),
229229
alt := "scaladoc",

scaladoc/src/dotty/tools/scaladoc/site/LoadedTemplate.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ case class LoadedTemplate(
4242
val subpages = children.filterNot(_.hidden).map(_.lazyTemplateProperties(ctx))
4343
def getMap(key: String) = templateFile.settings.getOrElse(key, Map.empty).asInstanceOf[Map[String, Object]]
4444

45-
val sourceLinks = if !file.exists() then Nil else
45+
val sourceLinks = if !templateFile.file.exists() then Nil else
4646
// TODO (https://github.com/lampepfl/scala3doc/issues/240): configure source root
4747
// toRealPath is used to turn symlinks into proper paths
48-
val actualPath = Paths.get("").toAbsolutePath.relativize(file.toPath.toRealPath())
48+
val actualPath = Paths.get("").toAbsolutePath.relativize(templateFile.file.toPath.toRealPath())
4949
ctx.sourceLinks.pathTo(actualPath).map("viewSource" -> _ ) ++
50-
ctx.sourceLinks.pathTo(actualPath, operation = "edit", optionalRevision = Some("master")).map("editSource" -> _)
50+
ctx.sourceLinks.pathTo(actualPath, operation = "edit").map("editSource" -> _)
5151

5252
val updatedSettings = templateFile.settings ++ ctx.projectWideProperties +
5353
("site" -> (getMap("site") + ("subpages" -> subpages))) + ("urls" -> sourceLinks.toMap) +

0 commit comments

Comments
 (0)