renderer.BriefCommentPreprocessor.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of renderer Show documentation
Show all versions of renderer Show documentation
Dokka plugin that adds the Material for MkDocs format
/*
* Copyright 2014-2024 JetBrains s.r.o & OpenSavvy. Use of this source code is governed by the Apache 2.0 license.
*/
package opensavvy.dokka.material.mkdocs.renderer
import org.jetbrains.dokka.pages.*
import org.jetbrains.dokka.transformers.pages.PageTransformer
class BriefCommentPreprocessor : PageTransformer {
override fun invoke(input: RootPageNode): RootPageNode {
return input.transformContentPagesTree { contentPage ->
contentPage.modified(content = contentPage.content.recursiveMapTransform {
if (it.dci.kind == ContentKind.BriefComment) {
it.copy(style = it.style + setOf(TextStyle.Block))
} else {
it
}
})
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy