diff options
Diffstat (limited to 'plugins/base/src/main/kotlin/translators')
-rw-r--r-- | plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt | 6 | ||||
-rw-r--r-- | plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt index caeb6bcb..6c1b5ea4 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt @@ -186,7 +186,7 @@ open class DefaultPageCreator( .groupBy({ it.second }, { it.first }).map { (classlike, platforms) -> val label = classlike.classNames?.substringBeforeLast(".") ?: classlike.toString() .also { logger.warn("No class name found for DRI $classlike") } - buildGroup(setOf(dri), platforms.toSet(), ContentKind.Inheritors, extra = mainExtra + SymbolAnchorHint(label)) { + buildGroup(setOf(classlike), platforms.toSet(), ContentKind.Inheritors, extra = mainExtra + SymbolAnchorHint(label, ContentKind.Inheritors)) { link(label, classlike) } }, @@ -530,7 +530,7 @@ open class DefaultPageCreator( sourceSets = elements.flatMap { it.sourceSets }.toSet(), kind = kind, styles = emptySet(), - extra = elementName?.let { name -> extra + SymbolAnchorHint(name) } ?: extra + extra = elementName?.let { name -> extra + SymbolAnchorHint(name, kind) } ?: extra ) { link(elementName.orEmpty(), elements.first().dri, kind = kind) divergentGroup( @@ -540,7 +540,7 @@ open class DefaultPageCreator( extra = extra ) { elements.map { - instance(setOf(it.dri), it.sourceSets.toSet(), extra = PropertyContainer.withAll(SymbolAnchorHint(it.name ?: ""))) { + instance(setOf(it.dri), it.sourceSets.toSet(), extra = PropertyContainer.withAll(SymbolAnchorHint(it.name ?: "", kind))) { divergent { group { +buildSignature(it) diff --git a/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt b/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt index c67fe4b0..1865f276 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt @@ -115,7 +115,7 @@ open class PageContentBuilder( sourceSets, kind, styles, - extra + SymbolAnchorHint(text.replace("\\s".toRegex(), "").toLowerCase()) + extra + SymbolAnchorHint(text.replace("\\s".toRegex(), "").toLowerCase(), kind) ) { text(text, kind = kind) block() @@ -185,7 +185,7 @@ open class PageContentBuilder( else it } .map { - val newExtra = if (needsAnchors) extra + SymbolAnchorHint.from(it) else extra + val newExtra = if (needsAnchors) extra + SymbolAnchorHint.from(it, kind) else extra buildGroup(setOf(it.dri), it.sourceSets.toSet(), kind, styles, newExtra) { operation(it) } |