From c01e49eec9558736959d12820361624a3c3e41e5 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Mon, 1 Mar 2021 11:57:30 +0100 Subject: Suppress tag support (#1742) * Suppress tag support * Support Hide tag in javadoc * Extract hide tag to be in separate plugin --- .../main/kotlin/transformers/HideTagDocumentableFilter.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 plugins/android-documentation/src/main/kotlin/transformers/HideTagDocumentableFilter.kt (limited to 'plugins/android-documentation/src/main/kotlin/transformers') diff --git a/plugins/android-documentation/src/main/kotlin/transformers/HideTagDocumentableFilter.kt b/plugins/android-documentation/src/main/kotlin/transformers/HideTagDocumentableFilter.kt new file mode 100644 index 00000000..074413cc --- /dev/null +++ b/plugins/android-documentation/src/main/kotlin/transformers/HideTagDocumentableFilter.kt @@ -0,0 +1,13 @@ +package org.jetbrains.dokka.android.transformers + +import org.jetbrains.dokka.base.transformers.documentables.SuppressedByTagDocumentableFilterTransformer +import org.jetbrains.dokka.model.Documentable +import org.jetbrains.dokka.model.dfs +import org.jetbrains.dokka.model.doc.CustomTagWrapper +import org.jetbrains.dokka.plugability.DokkaContext + +class HideTagDocumentableFilter(val dokkaContext: DokkaContext) : + SuppressedByTagDocumentableFilterTransformer(dokkaContext) { + override fun shouldBeSuppressed(d: Documentable): Boolean = + d.documentation.any { (_, docs) -> docs.dfs { it is CustomTagWrapper && it.name.trim() == "hide" } != null } +} \ No newline at end of file -- cgit