Skip to content

Commit

Permalink
Rename resolveKDocLinkDRI to resolveKDocLinkToDRI
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnatBeresnev committed Nov 22, 2023
1 parent 610b552 commit 8f16281
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ internal fun KtAnalysisSession.getKDocDocumentationFrom(symbol: KtSymbol, logger

parseFromKDocTag(
kDocTag = kDocContent.contentTag,
externalDri = { link -> resolveKDocLinkDRI(link).ifUnresolved { logger.logUnresolvedLink(link.getLinkText(), kdocLocation) } },
externalDri = { link -> resolveKDocLinkToDRI(link).ifUnresolved { logger.logUnresolvedLink(link.getLinkText(), kdocLocation) } },
kdocLocation = kdocLocation
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ internal inline fun DRI?.ifUnresolved(action: () -> Unit): DRI? = this ?: run {
*/
internal fun KtAnalysisSession.resolveKDocTextLinkDRI(link: String, context: PsiElement? = null): DRI? {
val kDocLink = createKDocLink(link, context)
return kDocLink?.let { resolveKDocLinkDRI(it) }
return kDocLink?.let { resolveKDocLinkToDRI(it) }
}

/**
Expand Down Expand Up @@ -70,7 +70,7 @@ private fun KtAnalysisSession.createKDocLink(link: String, context: PsiElement?
*
* @return [DRI] or null if the [link] is unresolved
*/
internal fun KtAnalysisSession.resolveKDocLinkDRI(link: KDocLink): DRI? {
internal fun KtAnalysisSession.resolveKDocLinkToDRI(link: KDocLink): DRI? {
val linkedSymbol = resolveToSymbol(link)
return if (linkedSymbol == null) null
else getDRIFromSymbol(linkedSymbol)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.jetbrains.dokka.analysis.java.parsers.DocCommentParser
import org.jetbrains.dokka.analysis.kotlin.symbols.kdoc.*
import org.jetbrains.dokka.analysis.kotlin.symbols.kdoc.logUnresolvedLink
import org.jetbrains.dokka.analysis.kotlin.symbols.kdoc.parseFromKDocTag
import org.jetbrains.dokka.analysis.kotlin.symbols.kdoc.resolveKDocLinkDRI
import org.jetbrains.dokka.analysis.kotlin.symbols.kdoc.resolveKDocLinkToDRI
import org.jetbrains.dokka.analysis.kotlin.symbols.plugin.SymbolsAnalysisPlugin
import org.jetbrains.dokka.model.doc.DocumentationNode
import org.jetbrains.dokka.plugability.DokkaContext
Expand Down Expand Up @@ -42,7 +42,7 @@ internal class KotlinDocCommentParser(
return analyze(kotlinAnalysis.getModule(sourceSet)) {
parseFromKDocTag(
kDocTag = element.comment,
externalDri = { link -> resolveKDocLinkDRI(link).ifUnresolved { context.logger.logUnresolvedLink(link.getLinkText(), elementName) } },
externalDri = { link -> resolveKDocLinkToDRI(link).ifUnresolved { context.logger.logUnresolvedLink(link.getLinkText(), elementName) } },
kdocLocation = null,
parseWithChildren = parseWithChildren
)
Expand Down

0 comments on commit 8f16281

Please sign in to comment.