diff options
Diffstat (limited to 'plugins/gfm/src/main/kotlin/GfmPlugin.kt')
-rw-r--r-- | plugins/gfm/src/main/kotlin/GfmPlugin.kt | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/gfm/src/main/kotlin/GfmPlugin.kt b/plugins/gfm/src/main/kotlin/GfmPlugin.kt index b7e9f6ab..fead66f1 100644 --- a/plugins/gfm/src/main/kotlin/GfmPlugin.kt +++ b/plugins/gfm/src/main/kotlin/GfmPlugin.kt @@ -63,7 +63,11 @@ open class CommonmarkRenderer( append("]($address)") } - override fun StringBuilder.buildList(node: ContentList, pageContext: ContentPage, platformRestriction: SourceSetData?) { + override fun StringBuilder.buildList( + node: ContentList, + pageContext: ContentPage, + platformRestriction: Set<SourceSetData>? + ) { buildParagraph() buildListLevel(node, pageContext) buildParagraph() @@ -92,7 +96,7 @@ open class CommonmarkRenderer( node.children, pageContext, "${node.extra.allOfType<SimpleAttr>().find { it.extraKey == "start" }?.extraValue - ?: 1.also { context.logger.error("No starting number specified for ordered list in node ${pageContext.dri.first()}!")}}." + ?: 1.also { context.logger.error("No starting number specified for ordered list in node ${pageContext.dri.first()}!") }}." ) } else { buildListItem(node.children, pageContext, "*") @@ -109,7 +113,7 @@ open class CommonmarkRenderer( override fun StringBuilder.buildPlatformDependent(content: PlatformHintedContent, pageContext: ContentPage) { val distinct = content.sourceSets.map { - it to StringBuilder().apply {buildContentNode(content.inner, pageContext, it) }.toString() + it to StringBuilder().apply {buildContentNode(content.inner, pageContext, setOf(it)) }.toString() }.groupBy(Pair<SourceSetData, String>::second, Pair<SourceSetData, String>::first) if (distinct.size == 1) @@ -124,7 +128,11 @@ open class CommonmarkRenderer( append("Resource") } - override fun StringBuilder.buildTable(node: ContentTable, pageContext: ContentPage, platformRestriction: SourceSetData?) { + override fun StringBuilder.buildTable( + node: ContentTable, + pageContext: ContentPage, + platformRestriction: Set<SourceSetData>? + ) { buildParagraph() val size = node.children.firstOrNull()?.children?.size ?: 0 |