From 1aba0ec4973d7915caa93f1e9b3146ad82111903 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Fri, 30 Oct 2020 19:01:09 +0100 Subject: Fix parsing first word in deprecated (#1595) Fix parsing first word in `Deprecated` annotations, fix `Throws` and `See` tags --- core/src/main/kotlin/model/doc/DocTag.kt | 5 +++++ core/src/main/kotlin/model/doc/TagWrapper.kt | 2 +- core/src/main/kotlin/pages/ContentNodes.kt | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'core/src') diff --git a/core/src/main/kotlin/model/doc/DocTag.kt b/core/src/main/kotlin/model/doc/DocTag.kt index 04b5c913..7698ebb3 100644 --- a/core/src/main/kotlin/model/doc/DocTag.kt +++ b/core/src/main/kotlin/model/doc/DocTag.kt @@ -354,3 +354,8 @@ data class Var( override val children: List = emptyList(), override val params: Map = emptyMap() ) : DocTag() + +data class Caption( + override val children: List = emptyList(), + override val params: Map = emptyMap() +) : DocTag() \ No newline at end of file diff --git a/core/src/main/kotlin/model/doc/TagWrapper.kt b/core/src/main/kotlin/model/doc/TagWrapper.kt index cfe99b1e..cea132a8 100644 --- a/core/src/main/kotlin/model/doc/TagWrapper.kt +++ b/core/src/main/kotlin/model/doc/TagWrapper.kt @@ -22,7 +22,7 @@ data class Param(override val root: DocTag, override val name: String) : NamedTa data class Return(override val root: DocTag) : TagWrapper() data class Receiver(override val root: DocTag) : TagWrapper() data class Constructor(override val root: DocTag) : TagWrapper() -data class Throws(override val root: DocTag, override val name: String) : NamedTagWrapper() +data class Throws(override val root: DocTag, override val name: String, val exceptionAddress: DRI?) : NamedTagWrapper() data class Sample(override val root: DocTag, override val name: String) : NamedTagWrapper() data class Deprecated(override val root: DocTag) : TagWrapper() data class Property(override val root: DocTag, override val name: String) : NamedTagWrapper() diff --git a/core/src/main/kotlin/pages/ContentNodes.kt b/core/src/main/kotlin/pages/ContentNodes.kt index 77e6ebb2..303fa803 100644 --- a/core/src/main/kotlin/pages/ContentNodes.kt +++ b/core/src/main/kotlin/pages/ContentNodes.kt @@ -182,6 +182,7 @@ interface ContentComposite : ContentNode { /** Tables */ data class ContentTable( val header: List, + val caption: ContentGroup? = null, override val children: List, override val dci: DCI, override val sourceSets: Set, @@ -343,7 +344,7 @@ enum class TextStyle : Style { } enum class ContentStyle : Style { - RowTitle, TabbedContent, WithExtraAttributes, RunnableSample, InDocumentationAnchor + RowTitle, TabbedContent, WithExtraAttributes, RunnableSample, InDocumentationAnchor, Caption } object CommentTable : Style -- cgit