Skip to content

Commit 23764fd

Browse files
committed
Keep the original logic: count names in absolute path
1 parent 4b3340f commit 23764fd

File tree

1 file changed

+2
-2
lines changed
  • doc-tool/src/dotty/tools/dottydoc/staticsite

1 file changed

+2
-2
lines changed

doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ case class Site(
167167
private def defaultParams(pageLocation: JFile, additionalDepth: Int = 0): DefaultParams = {
168168
val pathFromRoot = stripRoot(pageLocation)
169169
val baseUrl: String = {
170-
val rootLen = root.toPath.normalize.getNameCount
171-
val assetLen = pageLocation.toPath.normalize.getNameCount
170+
val rootLen = root.toPath.toAbsolutePath.normalize.getNameCount
171+
val assetLen = pageLocation.toPath.toAbsolutePath.normalize.getNameCount
172172
"../" * (assetLen - rootLen + additionalDepth) + "."
173173
}
174174

0 commit comments

Comments
 (0)