aboutsummaryrefslogtreecommitdiff
path: root/plugins/jekyll/src/main/kotlin
diff options
context:
space:
mode:
authorMike Sinkovsky <msink@users.noreply.github.com>2021-06-26 01:29:17 +0500
committerGitHub <noreply@github.com>2021-06-25 22:29:17 +0200
commit46b33710df5418fd3b668ea0753a8bd72f63c406 (patch)
tree4100d599be82488d78f6f27720bccec37e4ac397 /plugins/jekyll/src/main/kotlin
parentc2182b766a65619c859c0fc871a8a6334d66f199 (diff)
downloaddokka-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/src/main/kotlin')
-rw-r--r--plugins/jekyll/src/main/kotlin/JekyllPlugin.kt11
1 files changed, 7 insertions, 4 deletions
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)