diff options
author | Mike Sinkovsky <msink@users.noreply.github.com> | 2021-06-26 01:29:17 +0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-25 22:29:17 +0200 |
commit | 46b33710df5418fd3b668ea0753a8bd72f63c406 (patch) | |
tree | 4100d599be82488d78f6f27720bccec37e4ac397 /plugins/jekyll | |
parent | c2182b766a65619c859c0fc871a8a6334d66f199 (diff) | |
download | dokka-46b33710df5418fd3b668ea0753a8bd72f63c406.tar.gz dokka-46b33710df5418fd3b668ea0753a8bd72f63c406.tar.bz2 dokka-46b33710df5418fd3b668ea0753a8bd72f63c406.zip |
Cleanup paragraphs and tables in GFM renderer (#1946)
* 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 <kamil.doleglo@interia.pl>
Diffstat (limited to 'plugins/jekyll')
-rw-r--r-- | plugins/jekyll/api/jekyll.api | 1 | ||||
-rw-r--r-- | plugins/jekyll/src/main/kotlin/JekyllPlugin.kt | 11 |
2 files changed, 8 insertions, 4 deletions
diff --git a/plugins/jekyll/api/jekyll.api b/plugins/jekyll/api/jekyll.api index d36b70c2..28d01241 100644 --- a/plugins/jekyll/api/jekyll.api +++ b/plugins/jekyll/api/jekyll.api @@ -1,5 +1,6 @@ public final class org/jetbrains/dokka/jekyll/JekyllPlugin : org/jetbrains/dokka/plugability/DokkaPlugin { public fun <init> ()V + public final fun getBriefCommentPreprocessor ()Lorg/jetbrains/dokka/plugability/Extension; public final fun getJekyllPreprocessors ()Lorg/jetbrains/dokka/plugability/ExtensionPoint; public final fun getPackageListCreator ()Lorg/jetbrains/dokka/plugability/Extension; public final fun getRenderer ()Lorg/jetbrains/dokka/plugability/Extension; 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) |