From 04cf1cdd3a909fa62e5ffda5b7d04695c749177e Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Thu, 9 Jul 2020 10:45:06 +0200 Subject: Implement javadoc search --- .../transformers/pages/comments/DocTagToContentConverter.kt | 8 ++++++++ plugins/base/src/main/kotlin/translators/psi/JavadocParser.kt | 1 + 2 files changed, 9 insertions(+) (limited to 'plugins/base/src/main/kotlin') 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 19817992..0f953e0f 100644 --- a/plugins/base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt +++ b/plugins/base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt @@ -164,6 +164,14 @@ object DocTagToContentConverter : CommentsToContentConverter { styles ) ) + is Index -> listOf( + ContentGroup( + buildChildren(docTag, newStyles = styles + ContentStyle.InDocumentationAnchor), + dci, + sourceSets, + styles + ) + ) else -> buildChildren(docTag) } } diff --git a/plugins/base/src/main/kotlin/translators/psi/JavadocParser.kt b/plugins/base/src/main/kotlin/translators/psi/JavadocParser.kt index 2e921e83..81955fde 100644 --- a/plugins/base/src/main/kotlin/translators/psi/JavadocParser.kt +++ b/plugins/base/src/main/kotlin/translators/psi/JavadocParser.kt @@ -198,6 +198,7 @@ class JavadocParser( "code", "literal" -> { CodeInline(listOf(Text(tag.text))) } + "index" -> Index(tag.children.filterIsInstance().map { Text(it.text) }) else -> Text(tag.text) } -- cgit