diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2022-09-02 17:44:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-02 17:44:05 +0200 |
commit | 56ff8f3f24209bc9edaece876c56bd3fde1fbf8a (patch) | |
tree | 82ec6b6d9295f09b96d37166d2423b036313d7a6 /plugins/base/src/main/kotlin/renderers | |
parent | 7aae28c09fc52f67d18babb0238dc8a4d397c2ad (diff) | |
download | dokka-56ff8f3f24209bc9edaece876c56bd3fde1fbf8a.tar.gz dokka-56ff8f3f24209bc9edaece876c56bd3fde1fbf8a.tar.bz2 dokka-56ff8f3f24209bc9edaece876c56bd3fde1fbf8a.zip |
Underline `@param` tag key for more consistency (#2643)
* Underline `@param` tag key for more consistency
* Correct keyValue table column ratio
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 1 | ||||
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/Tags.kt | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index f5c3854c..cb7f58d2 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -791,6 +791,7 @@ open class HtmlRenderer( TextStyle.Strikethrough -> strike { body() } TextStyle.Strong -> strong { body() } TextStyle.Var -> htmlVar { body() } + TextStyle.Underlined -> underline { body() } is TokenStyle -> span("token " + styleToApply.toString().toLowerCase()) { body() } else -> body() } diff --git a/plugins/base/src/main/kotlin/renderers/html/Tags.kt b/plugins/base/src/main/kotlin/renderers/html/Tags.kt index ef27b934..18a321cc 100644 --- a/plugins/base/src/main/kotlin/renderers/html/Tags.kt +++ b/plugins/base/src/main/kotlin/renderers/html/Tags.kt @@ -26,6 +26,12 @@ inline fun FlowOrPhrasingContent.strike(classes : String? = null, crossinline bl open class STRIKE(initialAttributes: Map<String, String>, override val consumer: TagConsumer<*>) : HTMLTag("strike", consumer, initialAttributes, null, false, false), HtmlBlockInlineTag +@HtmlTagMarker +inline fun FlowOrPhrasingContent.underline(classes : String? = null, crossinline block : UNDERLINE.() -> Unit = {}) : Unit = UNDERLINE(attributesMapOf("class", classes), consumer).visit(block) + +open class UNDERLINE(initialAttributes: Map<String, String>, override val consumer: TagConsumer<*>) : + HTMLTag("u", consumer, initialAttributes, null, false, false), HtmlBlockInlineTag + const val TEMPLATE_COMMAND_SEPARATOR = ":" const val TEMPLATE_COMMAND_BEGIN_BORDER = "[+]cmd" const val TEMPLATE_COMMAND_END_BORDER = "[-]cmd" |