From 46b33710df5418fd3b668ea0753a8bd72f63c406 Mon Sep 17 00:00:00 2001 From: Mike Sinkovsky Date: Sat, 26 Jun 2021 01:29:17 +0500 Subject: Cleanup paragraphs and tables in GFM renderer (#1946) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * GFM renderer: cleanup paragraphs * GFM renderer: cleanup tables * GFM renderer: add tests for wrong header in table Table with extra cell in row is really generated by `all-modules-page` plugin * Remove commented-out lines * Add BriefCommentPreprocessor which inserts a line break between a signature and a brief comment Fixed a bug with `mapTransform` function which replaces table headers with their contents Co-authored-by: Kamil Doległo --- plugins/jekyll/src/main/kotlin/JekyllPlugin.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'plugins/jekyll/src/main/kotlin') diff --git a/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt b/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt index bcc73862..675dfb39 100644 --- a/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt +++ b/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt @@ -4,16 +4,15 @@ import org.jetbrains.dokka.CoreExtensions import org.jetbrains.dokka.base.renderers.PackageListCreator import org.jetbrains.dokka.base.renderers.RootCreator import org.jetbrains.dokka.base.resolvers.shared.RecognizedLinkFormat -import org.jetbrains.dokka.gfm.renderer.CommonmarkRenderer import org.jetbrains.dokka.gfm.GfmPlugin -import org.jetbrains.dokka.pages.* +import org.jetbrains.dokka.gfm.renderer.BriefCommentPreprocessor +import org.jetbrains.dokka.gfm.renderer.CommonmarkRenderer +import org.jetbrains.dokka.pages.ContentPage import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.plugability.DokkaPlugin import org.jetbrains.dokka.plugability.plugin import org.jetbrains.dokka.plugability.query import org.jetbrains.dokka.transformers.pages.PageTransformer -import java.lang.StringBuilder - class JekyllPlugin : DokkaPlugin() { @@ -29,6 +28,10 @@ class JekyllPlugin : DokkaPlugin() { jekyllPreprocessors with RootCreator } + val briefCommentPreprocessor by extending { + jekyllPreprocessors with BriefCommentPreprocessor() + } + val packageListCreator by extending { jekyllPreprocessors providing { PackageListCreator(it, RecognizedLinkFormat.DokkaJekyll) -- cgit