File tree Expand file tree Collapse file tree 4 files changed +47
-3
lines changed
main/kotlin/com/quarkdown/quarkdoc/dokka/page
test/kotlin/com/quarkdown/quarkdoc/dokka Expand file tree Collapse file tree 4 files changed +47
-3
lines changed Original file line number Diff line number Diff line change 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
5052Captions 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
Original file line number Diff line number Diff line change 11package com.quarkdown.quarkdoc.dokka.page
22
3+ import com.quarkdown.core.util.stripAnchor
34import com.quarkdown.quarkdoc.dokka.util.findDeep
45import org.jetbrains.dokka.base.translators.documentables.PageContentBuilder
56import 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}
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change 1- 1.15.0
1+ 1.15.1
You can’t perform that action at this time.
0 commit comments