diff options
Diffstat (limited to 'plugins/gfm')
-rw-r--r-- | plugins/gfm/api/gfm.api | 4 | ||||
-rw-r--r-- | plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt | 28 |
2 files changed, 16 insertions, 16 deletions
diff --git a/plugins/gfm/api/gfm.api b/plugins/gfm/api/gfm.api index fc388825..ba189898 100644 --- a/plugins/gfm/api/gfm.api +++ b/plugins/gfm/api/gfm.api @@ -48,14 +48,14 @@ public class org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer : org/jetbrains public fun buildError (Lorg/jetbrains/dokka/pages/ContentNode;)V public synthetic fun buildHeader (Ljava/lang/Object;ILorg/jetbrains/dokka/pages/ContentHeader;Lkotlin/jvm/functions/Function1;)V public fun buildHeader (Ljava/lang/StringBuilder;ILorg/jetbrains/dokka/pages/ContentHeader;Lkotlin/jvm/functions/Function1;)V + public synthetic fun buildLineBreak (Ljava/lang/Object;)V + public fun buildLineBreak (Ljava/lang/StringBuilder;)V public synthetic fun buildLink (Ljava/lang/Object;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V public fun buildLink (Ljava/lang/StringBuilder;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V public synthetic fun buildList (Ljava/lang/Object;Lorg/jetbrains/dokka/pages/ContentList;Lorg/jetbrains/dokka/pages/ContentPage;Ljava/util/Set;)V public fun buildList (Ljava/lang/StringBuilder;Lorg/jetbrains/dokka/pages/ContentList;Lorg/jetbrains/dokka/pages/ContentPage;Ljava/util/Set;)V public synthetic fun buildNavigation (Ljava/lang/Object;Lorg/jetbrains/dokka/pages/PageNode;)V public fun buildNavigation (Ljava/lang/StringBuilder;Lorg/jetbrains/dokka/pages/PageNode;)V - public synthetic fun buildNewLine (Ljava/lang/Object;)V - public fun buildNewLine (Ljava/lang/StringBuilder;)V public fun buildPage (Lorg/jetbrains/dokka/pages/ContentPage;Lkotlin/jvm/functions/Function2;)Ljava/lang/String; public synthetic fun buildPlatformDependent (Ljava/lang/Object;Lorg/jetbrains/dokka/pages/PlatformHintedContent;Lorg/jetbrains/dokka/pages/ContentPage;Ljava/util/Set;)V public fun buildPlatformDependent (Ljava/lang/StringBuilder;Lorg/jetbrains/dokka/pages/PlatformHintedContent;Lorg/jetbrains/dokka/pages/ContentPage;Ljava/util/Set;)V diff --git a/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt b/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt index 36e461a9..e940fffd 100644 --- a/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt +++ b/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt @@ -98,18 +98,18 @@ open class CommonmarkRenderer( } else buildText(node.children, pageContext, sourceSetRestriction) } - override fun StringBuilder.buildNewLine() { + override fun StringBuilder.buildLineBreak() { append("\\") - appendNewLine() + buildNewLine() } - private fun StringBuilder.appendNewLine() { + private fun StringBuilder.buildNewLine() { append("\n") } private fun StringBuilder.buildParagraph() { - appendNewLine() - appendNewLine() + buildNewLine() + buildNewLine() } override fun StringBuilder.buildPlatformDependent( @@ -135,7 +135,7 @@ open class CommonmarkRenderer( distinct.filter { it.key.isNotBlank() }.forEach { (text, platforms) -> buildParagraph() buildSourceSetTags(platforms.toSet()) - buildNewLine() + buildLineBreak() append(text.trim()) buildParagraph() } @@ -154,18 +154,18 @@ open class CommonmarkRenderer( pageContext: ContentPage, sourceSetRestriction: Set<DisplaySourceSet>? ) { - appendNewLine() + buildNewLine() if (node.dci.kind == ContentKind.Sample || node.dci.kind == ContentKind.Parameters) { node.sourceSets.forEach { sourcesetData -> append(sourcesetData.name) - appendNewLine() + buildNewLine() buildTable( node.copy( children = node.children.filter { it.sourceSets.contains(sourcesetData) }, dci = node.dci.copy(kind = ContentKind.Main) ), pageContext, sourceSetRestriction ) - appendNewLine() + buildNewLine() } } else { val size = node.header.firstOrNull()?.children?.size ?: node.children.firstOrNull()?.children?.size ?: 0 @@ -183,11 +183,11 @@ open class CommonmarkRenderer( append("| ".repeat(size)) } append("|") - appendNewLine() + buildNewLine() append("|---".repeat(size)) append("|") - appendNewLine() + buildNewLine() node.children.forEach { row -> row.children.forEach { cell -> @@ -202,7 +202,7 @@ open class CommonmarkRenderer( append(" ") } append("|") - appendNewLine() + buildNewLine() } } } @@ -256,7 +256,7 @@ open class CommonmarkRenderer( buildParagraph() buildSourceSetTags(sourceSets) - buildNewLine() + buildLineBreak() instance.before?.let { buildContentNode( @@ -272,7 +272,7 @@ open class CommonmarkRenderer( val (innerInstance, innerSourceSets) = innerEntry.getInstanceAndSourceSets() if (sourceSets.size > 1) { buildSourceSetTags(innerSourceSets) - buildNewLine() + buildLineBreak() } innerInstance.divergent.build( this@buildDivergent, |