From 01ce00036a403c1d6bba3cb1b4c228f2df3f8b6c Mon Sep 17 00:00:00 2001 From: Mike Sinkovsky Date: Mon, 19 Jul 2021 17:56:23 +0500 Subject: Minor: rename `buildNewLine` (#1987) * minor: rename `DefaultRenderer.buildNewLine` to `buildLineBreak` to better describe what it actually does. * minor: rename `CommonmarRenderer.appendNewLine` to `buildNewLine` for consistency. --- plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt | 4 ++-- plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/base/src/main/kotlin/renderers') diff --git a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt index 2694adc9..5eaf9fc7 100644 --- a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt @@ -34,7 +34,7 @@ abstract class DefaultRenderer( sourceSetRestriction: Set? = null ) - abstract fun T.buildNewLine() + abstract fun T.buildLineBreak() abstract fun T.buildResource(node: ContentEmbeddedResource, pageContext: ContentPage) abstract fun T.buildTable( node: ContentTable, @@ -115,7 +115,7 @@ abstract class DefaultRenderer( is ContentList -> buildList(node, pageContext, sourceSetRestriction) is ContentTable -> buildTable(node, pageContext, sourceSetRestriction) is ContentGroup -> buildGroup(node, pageContext, sourceSetRestriction) - is ContentBreakLine -> buildNewLine() + is ContentBreakLine -> buildLineBreak() is PlatformHintedContent -> buildPlatformDependent(node, pageContext, sourceSetRestriction) is ContentDivergentGroup -> buildDivergent(node, pageContext) is ContentDivergentInstance -> buildDivergentInstance(node, pageContext) diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index 5a6f7c83..a6eec0b9 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -656,7 +656,7 @@ open class HtmlRenderer( override fun buildError(node: ContentNode) = context.logger.error("Unknown ContentNode type: $node") - override fun FlowContent.buildNewLine() = br() + override fun FlowContent.buildLineBreak() = br() override fun FlowContent.buildLink(address: String, content: FlowContent.() -> Unit) = a(href = address, block = content) -- cgit