diff options
Diffstat (limited to 'plugins/base/src/main')
3 files changed, 4 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt index 80696cbf..0f7795e6 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt @@ -24,7 +24,7 @@ class DeprecatedDocumentableFilterTransformer(val context: DokkaContext) : PreMe fun <T> T.isAllowedInPackage(): Boolean where T : WithExtraProperties<T>, T : Documentable { val packageName = this.dri.packageName val condition = packageName != null && packageOptions.firstOrNull { - packageName.startsWith(it.prefix) + Regex(it.matchingRegex).matches(packageName) }?.skipDeprecated ?: globalOptions.skipDeprecated diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilterTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilterTransformer.kt index 57faeefb..1bc7a533 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilterTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilterTransformer.kt @@ -23,7 +23,7 @@ class DocumentableVisibilityFilterTransformer(val context: DokkaContext) : PreMe is JavaVisibility.Default, is KotlinVisibility.Public -> true else -> packageName != null - && packageOptions.firstOrNull { packageName.startsWith(it.prefix) }?.includeNonPublic + && packageOptions.firstOrNull { Regex(it.matchingRegex).matches(packageName) }?.includeNonPublic ?: globalOptions.includeNonPublic } diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt index 2608d9ba..a8fabc95 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt @@ -158,7 +158,7 @@ internal class ReportUndocumentedTransformer : DocumentableTransformer { ): DokkaConfiguration.PackageOptions? { val packageName = documentable.dri.packageName ?: return null return dokkaSourceSet.perPackageOptions - .filter { packageOptions -> packageName.startsWith(packageOptions.prefix) } - .maxBy { packageOptions -> packageOptions.prefix.length } + .filter { packageOptions -> Regex(packageOptions.matchingRegex).matches(packageName) } + .maxBy { packageOptions -> packageOptions.matchingRegex.length } } } |