aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin
diff options
context:
space:
mode:
authorAndrey Tyrin <tyrin.andrew@gmail.com>2022-08-10 17:43:33 +0300
committerGitHub <noreply@github.com>2022-08-10 16:43:33 +0200
commit732f8aac1eb6b2c137fdf81d9d670a30d0f8b9ea (patch)
tree5cfe56adbc45ac4672304efb924e248c34a7e154 /plugins/base/src/main/kotlin
parentd3ff6297c4034bbf45f4a60e287e12cfa1f0ad1a (diff)
downloaddokka-732f8aac1eb6b2c137fdf81d9d670a30d0f8b9ea.tar.gz
dokka-732f8aac1eb6b2c137fdf81d9d670a30d0f8b9ea.tar.bz2
dokka-732f8aac1eb6b2c137fdf81d9d670a30d0f8b9ea.zip
Support Var html tag for Javadoc (#2617)
Fixes #2358
Diffstat (limited to 'plugins/base/src/main/kotlin')
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt1
-rw-r--r--plugins/base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt1
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt1
3 files changed, 3 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 53645f06..55afef80 100644
--- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
@@ -777,6 +777,7 @@ open class HtmlRenderer(
TextStyle.Italic -> i { body() }
TextStyle.Strikethrough -> strike { body() }
TextStyle.Strong -> strong { body() }
+ TextStyle.Var -> htmlVar { body() }
is TokenStyle -> span("token " + styleToApply.toString().toLowerCase()) { body() }
else -> body()
}
diff --git a/plugins/base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt b/plugins/base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt
index b46a7679..1c447e9e 100644
--- a/plugins/base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt
+++ b/plugins/base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt
@@ -254,6 +254,7 @@ open class DocTagToContentConverter : CommentsToContentConverter {
extra = extras
)
)
+ is Var -> buildChildren(docTag, setOf(TextStyle.Var))
else -> buildChildren(docTag)
}
diff --git a/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt b/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt
index ce0d2ff3..7dc8e3a0 100644
--- a/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt
@@ -424,6 +424,7 @@ class JavadocParser(
"h1" -> ifChildrenPresent { H1(children) }
"h2" -> ifChildrenPresent { H2(children) }
"h3" -> ifChildrenPresent { H3(children) }
+ "var" -> ifChildrenPresent { Var(children) }
else -> listOf(Text(body = element.ownText()))
}
}