From b5eefd5c026f66eba8c7775b8ac0ba09a8a9f036 Mon Sep 17 00:00:00 2001 From: vmishenev Date: Thu, 9 Dec 2021 15:01:26 +0300 Subject: [PATCH 1/2] Make breakable text into See also block --- .../documentables/DefaultPageCreator.kt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt index b33351ac90..444981f7c4 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt @@ -442,12 +442,15 @@ open class DefaultPageCreator( kind = ContentKind.Comment, styles = this@group.mainStyles, ) { - if (it.address != null) link( - it.name, - it.address!!, - kind = ContentKind.Comment - ) - else text(it.name, kind = ContentKind.Comment) + group(styles = mainStyles + ContentStyle.RowTitle) { + it.address?.let { dri -> + link( + it.name, + dri, + kind = ContentKind.Comment + ) + } ?: text(it.name, kind = ContentKind.Comment) + } comment(it.root) } } From a7103ac41a65adffb8a1f3f1db51081b2b859105 Mon Sep 17 00:00:00 2001 From: vmishenev Date: Thu, 9 Dec 2021 15:24:53 +0300 Subject: [PATCH 2/2] Omit Group --- .../documentables/DefaultPageCreator.kt | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt index 444981f7c4..1b58135562 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt @@ -442,15 +442,18 @@ open class DefaultPageCreator( kind = ContentKind.Comment, styles = this@group.mainStyles, ) { - group(styles = mainStyles + ContentStyle.RowTitle) { - it.address?.let { dri -> - link( - it.name, - dri, - kind = ContentKind.Comment - ) - } ?: text(it.name, kind = ContentKind.Comment) - } + it.address?.let { dri -> + link( + it.name, + dri, + kind = ContentKind.Comment, + styles = mainStyles + ContentStyle.RowTitle + ) + } ?: text( + it.name, + kind = ContentKind.Comment, + styles = mainStyles + ContentStyle.RowTitle + ) comment(it.root) } }