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

.dokka.mkdocs.renderer.0.4.2.source-code.gfmTemplating.kt Maven / Gradle / Ivy

There is a newer version: 0.4.1
Show newest version
/*
 * Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
 */

package opensavvy.dokka.material.mkdocs

import org.jetbrains.dokka.base.templating.toJsonString
import org.jetbrains.dokka.links.DRI

public sealed class GfmCommand {

    public companion object {
        private const val delimiter = "\u1680"

        public val templateCommandRegex: Regex =
            Regex("(.+?)(?=")

        public val MatchResult.command: String
            get() = groupValues[1]

        public val MatchResult.label: String
            get() = groupValues[2]

        public fun Appendable.templateCommand(command: GfmCommand, content: Appendable.() -> Unit) {
            append("")
            content()
            append("")
        }
    }
}

public class ResolveLinkGfmCommand(
    public val dri: DRI
) : GfmCommand()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy