All Downloads are FREE. Search and download functionalities are using the official Maven repository.

renderer.BriefCommentPreprocessor.kt Maven / Gradle / Ivy

There is a newer version: 0.4.1
Show newest version
/*
 * 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