Skip to content

Commit c4c1f58

Browse files
authored
Merge branch 'main' into feat/permissions
2 parents dd770c8 + 539355b commit c4c1f58

File tree

4 files changed

+47
-3
lines changed

4 files changed

+47
-3
lines changed

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [Unreleased]
44

5+
## [1.15.1] - 2026-03-31
6+
57
### Changed
68

79
#### Subdocument link to nonexistent file now produces a visual error
@@ -49,6 +51,20 @@ Thanks @cyphercodes!
4951

5052
Captions now follow the global configuration for line spacing and letter spacing.
5153

54+
#### Fixed Quarkdoc `Wiki page` broken links if they contain anchors
55+
56+
The `@wiki` documentation tag now correctly preserves `#` anchor separators in wiki URLs.
57+
58+
* * *
59+
60+
### Sponsors
61+
62+
Thanks to our sponsors! 🎉
63+
64+
@vitto4
65+
66+
<a href="https://falconer.com"><img src="https://raw.githubusercontent.com/iamgio/quarkdown/project-files/images/sponsors/falconer.jpeg" alt="Falconer" width="350"></a>
67+
5268
## [1.15.0] - 2026-03-24
5369

5470
### Added
@@ -441,7 +457,9 @@ Shout out to our sponsors! 🎉
441457

442458
<a href="https://falconer.com"><img src="https://raw.githubusercontent.com/iamgio/quarkdown/project-files/images/sponsors/falconer.jpeg" alt="Falconer" width="350"></a>
443459

444-
[Unreleased]: https://github.com/iamgio/quarkdown/compare/v1.15.0...HEAD
460+
[Unreleased]: https://github.com/iamgio/quarkdown/compare/v1.15.1...HEAD
461+
462+
[1.15.1]: https://github.com/iamgio/quarkdown/compare/v1.15.0...v1.15.1
445463

446464
[1.15.0]: https://github.com/iamgio/quarkdown/compare/v1.14.1...v1.15.0
447465

quarkdown-quarkdoc/src/main/kotlin/com/quarkdown/quarkdoc/dokka/page/WikiLinkPageTransformer.kt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.quarkdown.quarkdoc.dokka.page
22

3+
import com.quarkdown.core.util.stripAnchor
34
import com.quarkdown.quarkdoc.dokka.util.findDeep
45
import org.jetbrains.dokka.base.translators.documentables.PageContentBuilder
56
import org.jetbrains.dokka.model.DFunction
@@ -44,7 +45,16 @@ class WikiLinkPageTransformer(
4445
documentable: DFunction,
4546
builder: PageContentBuilder.DocumentableContentBuilder,
4647
) = builder.buildGroup {
47-
val url = WIKI_ROOT + URLEncoder.encode(data, Charsets.UTF_8)
48+
val (page, anchor) = data.stripAnchor() ?: (data to null)
49+
val url =
50+
buildString {
51+
append(WIKI_ROOT)
52+
append(URLEncoder.encode(page, Charsets.UTF_8))
53+
if (anchor != null) {
54+
append('#')
55+
append(URLEncoder.encode(anchor, Charsets.UTF_8))
56+
}
57+
}
4858
link(data, url)
4959
}
5060
}

quarkdown-quarkdoc/src/test/kotlin/com/quarkdown/quarkdoc/dokka/WikiLinkTransformerTest.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,20 @@ class WikiLinkTransformerTest : QuarkdocDokkaTest() {
5555
assertContains(it, WIKI_ROOT + "home%3A+page")
5656
}
5757
}
58+
59+
@Test
60+
fun `wiki with anchor`() {
61+
test(
62+
"""
63+
/**
64+
* @wiki File data#reading-files
65+
*/
66+
fun func() = Unit
67+
""".trimIndent(),
68+
"func",
69+
) {
70+
assertContains(it, "Wiki page")
71+
assertContains(it, WIKI_ROOT + "File+data#reading-files")
72+
}
73+
}
5874
}

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.15.0
1+
1.15.1

0 commit comments

Comments
 (0)