diff --git a/docs/_docs/contributing/architecture/types.md b/docs/_docs/contributing/architecture/types.md index 64543e555e69..2dfdc33101a0 100644 --- a/docs/_docs/contributing/architecture/types.md +++ b/docs/_docs/contributing/architecture/types.md @@ -11,7 +11,7 @@ format corresponding to the backing data structure, e.g. `ExprType(...)` corresponds to `class ExprType`, defined in [Types.scala]. > You can inspect the representation of any type using the [dotty.tools.printTypes][DottyTypeStealer] -> script, its usage and integration into your debugging workflow is [described here](../issues/inspection.md). +> script, its usage and integration into your debugging workflow is [described here](../debugging/inspection.md). ### Types of Definitions diff --git a/docs/_docs/contributing/debugging/debugging.md b/docs/_docs/contributing/debugging/debugging.md index 5035620a45aa..a96e6bcdc7db 100644 --- a/docs/_docs/contributing/debugging/debugging.md +++ b/docs/_docs/contributing/debugging/debugging.md @@ -9,6 +9,6 @@ that you're having issues with. This can be just inspecting the trees of your code or stepping through the dotty codebase with a Debugger. The following sections will help you with this: -- [Debugging with your IDE](./ide-debugging.md.md) +- [Debugging with your IDE](./ide-debugging.md) - [How to Inspect Values](./inspection.md) - [Other Debugging Techniques](./other-debugging.md) diff --git a/docs/_docs/contributing/issues/cause.md b/docs/_docs/contributing/issues/cause.md index 385c72dc8738..e23f6d1f747f 100644 --- a/docs/_docs/contributing/issues/cause.md +++ b/docs/_docs/contributing/issues/cause.md @@ -69,7 +69,7 @@ This flag forces a stack trace to be printed each time an error happens, from th Analysing the trace will give you a clue about the objects involved in producing the error. For example, you can add some debug statements before the error is issued to discover the state of the compiler. [See some useful ways to debug -values.](./debugging/inspection.md) +values.](../debugging/inspection.md) ### Where was a particular object created? diff --git a/docs/_docs/contributing/issues/reproduce.md b/docs/_docs/contributing/issues/reproduce.md index 7d04e6794ed2..ca5da324a867 100644 --- a/docs/_docs/contributing/issues/reproduce.md +++ b/docs/_docs/contributing/issues/reproduce.md @@ -133,7 +133,7 @@ not be passed). This saves typing the same arguments each time you want to use t The following `launch.iss` file is an example of how you can use multiline commands as a template for solving issues that [run compiled -code](../issues/testing.md#checking-program-output). It demonstrates configuring +code](../testing.md#checking-program-output). It demonstrates configuring the `scala3/scalac` command using compiler flags, which are commented out. Put your favourite flags there for quick usage. diff --git a/scaladoc/src/dotty/tools/scaladoc/renderers/SiteRenderer.scala b/scaladoc/src/dotty/tools/scaladoc/renderers/SiteRenderer.scala index 9e464da893b3..7f64ce92ffc8 100644 --- a/scaladoc/src/dotty/tools/scaladoc/renderers/SiteRenderer.scala +++ b/scaladoc/src/dotty/tools/scaladoc/renderers/SiteRenderer.scala @@ -29,6 +29,14 @@ trait SiteRenderer(using DocContext) extends Locations: def siteContent(pageDri: DRI, content: ResolvedTemplate): PageContent = import content.ctx + + def tryAsDriPlain(str: String): Option[String] = + val (path, prefix) = str match + case HashRegex(path, prefix) => (path, prefix) + case _ => (str, "") + val res = ctx.driForLink(content.template.file, path).filter(driExists) + res.headOption.map(pathToPage(pageDri, _) + prefix) + def tryAsDri(str: String): Option[String] = val newStr = str.dropWhile(c => c == '.' || c == '/').replaceAll("/", ".") match @@ -51,7 +59,7 @@ trait SiteRenderer(using DocContext) extends Locations: )( resolveLink(pageDri, str.stripPrefix("/")) ) - def asStaticSite: Option[String] = tryAsDri(str) + def asStaticSite: Option[String] = tryAsDriPlain(str).orElse(tryAsDri(str)) /* Link resolving checks performs multiple strategies with following priority: 1. We check if the link is a valid URL e.g. http://dotty.epfl.ch