diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2020-07-14 20:32:17 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-07-15 15:49:06 +0200 |
commit | f5b8ba49eae0e611669e2f89eb0906b88db6f02c (patch) | |
tree | 5d7f7c6dfb746f725acf1909f63a151f3c2eb4bd /plugins/base/src | |
parent | c2b2f62dbce00e927214416cba33653048582443 (diff) | |
download | dokka-f5b8ba49eae0e611669e2f89eb0906b88db6f02c.tar.gz dokka-f5b8ba49eae0e611669e2f89eb0906b88db6f02c.tar.bz2 dokka-f5b8ba49eae0e611669e2f89eb0906b88db6f02c.zip |
Fix unnecessary 'Couldn't resolve link for' warning
Diffstat (limited to 'plugins/base/src')
-rw-r--r-- | plugins/base/src/main/kotlin/parsers/MarkdownParser.kt | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/parsers/MarkdownParser.kt b/plugins/base/src/main/kotlin/parsers/MarkdownParser.kt index 36005d14..05eb71ab 100644 --- a/plugins/base/src/main/kotlin/parsers/MarkdownParser.kt +++ b/plugins/base/src/main/kotlin/parsers/MarkdownParser.kt @@ -118,15 +118,13 @@ class MarkdownParser( declarationDescriptor, null, link.split('.') - ).minBy { it is ClassDescriptor }?.let { DRI.from(it) } + ).minByOrNull { it is ClassDescriptor }?.let { DRI.from(it) } } else null } catch (e1: IllegalArgumentException) { + logger.warn("Couldn't resolve link for $mdLink") null } } - }.also { - if (it == null) - logger.warn("Couldn't resolve link for $mdLink") } private fun referenceLinksHandler(node: ASTNode): DocTag { |