diff options
Diffstat (limited to 'plugins/base/src/main/kotlin/parsers/moduleAndPackage')
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationParsingContext.kt b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationParsingContext.kt index afdcc43f..9122d8ee 100644 --- a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationParsingContext.kt +++ b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationParsingContext.kt @@ -18,19 +18,19 @@ import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name fun interface ModuleAndPackageDocumentationParsingContext { - fun markdownParserFor(fragment: ModuleAndPackageDocumentationFragment): MarkdownParser + fun markdownParserFor(fragment: ModuleAndPackageDocumentationFragment, location: String): MarkdownParser } internal fun ModuleAndPackageDocumentationParsingContext.parse( fragment: ModuleAndPackageDocumentationFragment ): DocumentationNode { - return markdownParserFor(fragment).parse(fragment.documentation) + return markdownParserFor(fragment, fragment.source.sourceDescription).parse(fragment.documentation) } fun ModuleAndPackageDocumentationParsingContext( logger: DokkaLogger, facade: DokkaResolutionFacade? = null -) = ModuleAndPackageDocumentationParsingContext { fragment -> +) = ModuleAndPackageDocumentationParsingContext { fragment, sourceLocation -> val descriptor = when (fragment.classifier) { Module -> facade?.moduleDescriptor?.getPackage(FqName.topLevel(Name.identifier(""))) Package -> facade?.moduleDescriptor?.getPackage(FqName(fragment.name)) @@ -53,7 +53,7 @@ fun ModuleAndPackageDocumentationParsingContext( } } - MarkdownParser(externalDri = externalDri) + MarkdownParser(externalDri = externalDri, sourceLocation) } private fun Collection<DeclarationDescriptor>.sorted() = sortedWith( diff --git a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt index ea88e6e5..a21a5acb 100644 --- a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt +++ b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt @@ -30,7 +30,7 @@ private fun parseModuleAndPackageDocFragment( "Module" -> Module "Package" -> Package else -> throw IllegalStateException( - """Unexpected classifier ${classifierAndName[0]}, expected either "Module" or "Package". + """Unexpected classifier: "${classifierAndName[0]}", expected either "Module" or "Package". |For more information consult the specification: https://kotlinlang.org/docs/reference/kotlin-doc.html#module-and-package-documentation""".trimMargin() ) } |