Skip to content

Commit 9a949c4

Browse files
committed
Fix breadcrumbs and add tests
1 parent 807d258 commit 9a949c4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

scala3doc/src/dotty/renderers/HtmlRenderer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class HtmlRenderer(rootPackage: Member, val members: Map[DRI, Member])(using ctx
163163

164164
val parentsHtml =
165165
val innerTags = parents.flatMap[TagArg](b => Seq(
166-
a(href := pathToPage(b.dri, link.dri))(b.name),
166+
a(href := pathToPage(link.dri, b.dri))(b.name),
167167
"/"
168168
)).dropRight(1)
169169
div(cls := "breadcrumbs")(innerTags:_*)

scala3doc/test/dotty/dokka/site/SiteGeneratationTest.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ class SiteGeneratationTest extends BaseHtmlTest:
7272
withHtmlFile("docs/Adoc.html"){ content =>
7373
content.assertAttr("p a","href", "../api/tests/site/SomeClass.html")
7474
}
75+
76+
withHtmlFile("api/tests/site/SomeClass.html"){ content =>
77+
content.assertAttr(".breadcrumbs a","href",
78+
"../../../docs/index.html", "../../index.html", "../site.html", "SomeClass.html"
79+
)
80+
}
7581
}
7682

7783
@Test

0 commit comments

Comments
 (0)