aboutsummaryrefslogtreecommitdiff
path: root/subprojects/analysis-markdown-jb/src
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-08-31 20:16:01 +0200
committerGitHub <noreply@github.com>2023-08-31 20:16:01 +0200
commit02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 (patch)
tree66f6d6f089a93b863bf1144666491eca6729ad05 /subprojects/analysis-markdown-jb/src
parent6a181a7a2b03ec263788d137610e86937a57d434 (diff)
downloaddokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.gz
dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.bz2
dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.zip
Enable explicit API mode (#3139)
Diffstat (limited to 'subprojects/analysis-markdown-jb/src')
-rw-r--r--subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownApi.kt2
-rw-r--r--subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownParser.kt8
-rw-r--r--subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/ParseUtils.kt2
-rw-r--r--subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/Parser.kt6
4 files changed, 9 insertions, 9 deletions
diff --git a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownApi.kt b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownApi.kt
index 58ab5e70..bc56b596 100644
--- a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownApi.kt
+++ b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownApi.kt
@@ -9,4 +9,4 @@ import org.jetbrains.dokka.InternalDokkaApi
// TODO [beresnev] move/rename if it's only used for CustomDocTag. for now left as is for compatibility
@InternalDokkaApi
-val MARKDOWN_ELEMENT_FILE_NAME = MarkdownElementTypes.MARKDOWN_FILE.name
+public val MARKDOWN_ELEMENT_FILE_NAME: String = MarkdownElementTypes.MARKDOWN_FILE.name
diff --git a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownParser.kt b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownParser.kt
index 00f1e25d..256c7b98 100644
--- a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownParser.kt
+++ b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownParser.kt
@@ -24,7 +24,7 @@ import java.net.URL
import org.intellij.markdown.parser.MarkdownParser as IntellijMarkdownParser
@InternalDokkaApi
-open class MarkdownParser(
+public open class MarkdownParser(
private val externalDri: (String) -> DRI?,
private val kdocLocation: String?,
) : Parser() {
@@ -45,7 +45,7 @@ open class MarkdownParser(
return CustomDocTag(children = parsed, params = emptyMap(), name = "")
}
- override fun preparse(text: String) = text.replace("\r\n", "\n").replace("\r", "\n")
+ override fun preparse(text: String): String = text.replace("\r\n", "\n").replace("\r", "\n")
override fun parseTagWithBody(tagName: String, content: String): TagWrapper =
when (tagName) {
@@ -501,8 +501,8 @@ open class MarkdownParser(
)
- companion object {
- fun DRI.fqDeclarationName(): String? {
+ public companion object {
+ public fun DRI.fqDeclarationName(): String? {
if (this.target !is PointingToDeclaration) {
return null
}
diff --git a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/ParseUtils.kt b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/ParseUtils.kt
index ba5d2df2..0293d470 100644
--- a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/ParseUtils.kt
+++ b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/ParseUtils.kt
@@ -13,7 +13,7 @@ import org.jsoup.internal.StringUtil
import org.jsoup.nodes.Entities
@InternalDokkaApi
-fun String.parseHtmlEncodedWithNormalisedSpaces(
+public fun String.parseHtmlEncodedWithNormalisedSpaces(
renderWhiteCharactersAsSpaces: Boolean
): List<DocTag> {
val accum = StringBuilder()
diff --git a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/Parser.kt b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/Parser.kt
index e97d7b0c..28afa0c4 100644
--- a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/Parser.kt
+++ b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/Parser.kt
@@ -8,13 +8,13 @@ import org.jetbrains.dokka.InternalDokkaApi
import org.jetbrains.dokka.model.doc.*
@InternalDokkaApi
-abstract class Parser {
+public abstract class Parser {
- abstract fun parseStringToDocNode(extractedString: String): DocTag
+ public abstract fun parseStringToDocNode(extractedString: String): DocTag
protected abstract fun preparse(text: String): String
- open fun parse(text: String): DocumentationNode =
+ public open fun parse(text: String): DocumentationNode =
DocumentationNode(extractTagsToListOfPairs(preparse(text)).map { (tag, content) -> parseTagWithBody(tag, content) })
protected open fun parseTagWithBody(tagName: String, content: String): TagWrapper =