aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2021-09-20 11:35:26 +0200
committerGitHub <noreply@github.com>2021-09-20 11:35:26 +0200
commite6dd88c0cce8d61aeed19b4f49c7cca3d95b72b1 (patch)
tree6a9212739f9838e31661b7d9de45400d8ca0697b /plugins/base/src/main
parentcdb88fb3c0cc796cf121b2ab6194091058ccc30c (diff)
downloaddokka-e6dd88c0cce8d61aeed19b4f49c7cca3d95b72b1.tar.gz
dokka-e6dd88c0cce8d61aeed19b4f49c7cca3d95b72b1.tar.bz2
dokka-e6dd88c0cce8d61aeed19b4f49c7cca3d95b72b1.zip
Make see tag display as other tables (#2153)
Diffstat (limited to 'plugins/base/src/main')
-rw-r--r--plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt2
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt7
2 files changed, 5 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
index 548ca08e..300e0926 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
@@ -422,7 +422,7 @@ open class DefaultPageCreator(
row(
sourceSets = setOf(platform),
kind = ContentKind.Comment,
- styles = this@sourceSetDependentHint.mainStyles + ContentStyle.RowTitle,
+ styles = this@sourceSetDependentHint.mainStyles,
) {
if (it.address != null) link(
it.name,
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 6de3e0e0..b7e60cee 100644
--- a/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt
@@ -139,7 +139,7 @@ class JavadocParser(
) // Workaround: PSI returns first word after @author tag as a `DOC_TAG_VALUE_ELEMENT`, then the rest as a `DOC_COMMENT_DATA`, so for `Name Surname` we get them parted
JavadocTag.SEE -> {
val name =
- tag.resolveToElement()?.getKotlinFqName()?.asString() ?: tag.referenceElement()?.text.orEmpty()
+ tag.resolveToElement()?.getKotlinFqName()?.asString() ?: tag.referenceElement()?.text.orEmpty().removePrefix("#")
getSeeTagElementContent(tag, resolutionContext.copy(name = name)).let {
See(
wrapTagIfNecessary(it.first),
@@ -179,9 +179,10 @@ class JavadocParser(
tag: PsiDocTag,
context: CommentResolutionContext
): Pair<List<DocTag>, DRI?> {
- val linkElement = tag.referenceElement()?.toDocumentationLink(context = context)
+ val referenceElement = tag.referenceElement()
+ val linkElement = referenceElement?.toDocumentationLink(context = context)
val content = convertJavadocElements(
- tag.dataElements.dropWhile { it is PsiWhiteSpace || (it as? LazyParseablePsiElement)?.tokenType == JavaDocElementType.DOC_REFERENCE_HOLDER },
+ tag.dataElements.dropWhile { it is PsiWhiteSpace || (it as? LazyParseablePsiElement)?.tokenType == JavaDocElementType.DOC_REFERENCE_HOLDER || it == referenceElement },
context = context
)
return Pair(content, linkElement?.dri)