diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-11-24 22:30:08 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-11-24 22:30:08 +0300 |
commit | d3632025ad78af2809f751543f78013c8a4e6def (patch) | |
tree | 0c185ba74d8a1330a131c813119b4475ec8362e4 | |
parent | a88cd9d682866df1f379447ea07928463ee0f696 (diff) | |
download | dokka-d3632025ad78af2809f751543f78013c8a4e6def.tar.gz dokka-d3632025ad78af2809f751543f78013c8a4e6def.tar.bz2 dokka-d3632025ad78af2809f751543f78013c8a4e6def.zip |
Add warning on unresolved link in packageDocs
-rw-r--r-- | core/src/main/kotlin/Model/PackageDocs.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/main/kotlin/Model/PackageDocs.kt b/core/src/main/kotlin/Model/PackageDocs.kt index 3b03324c..1f6bdcb9 100644 --- a/core/src/main/kotlin/Model/PackageDocs.kt +++ b/core/src/main/kotlin/Model/PackageDocs.kt @@ -32,7 +32,7 @@ class PackageDocs targetContent = findTargetContent(headingText.trimStart()) } } else { - buildContentTo(it, targetContent, LinkResolver(linkMap, { resolveContentLink(it, linkResolveContext) })) + buildContentTo(it, targetContent, LinkResolver(linkMap, { resolveContentLink(fileName, it, linkResolveContext) })) } } } else { @@ -53,7 +53,7 @@ class PackageDocs private fun findOrCreatePackageContent(packageName: String) = _packageContent.getOrPut(packageName) { -> MutableContent() } - private fun resolveContentLink(href: String, linkResolveContext: List<PackageFragmentDescriptor>): ContentBlock { + private fun resolveContentLink(fileName: String, href: String, linkResolveContext: List<PackageFragmentDescriptor>): ContentBlock { if (linkResolver != null) { linkResolveContext .asSequence() @@ -62,6 +62,7 @@ class PackageDocs .firstOrNull() ?.let { return it } } + logger.warn("Unresolved link to `$href` in include ($fileName)") return ContentExternalLink("#") } }
\ No newline at end of file |