aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorMarcin Aman <maman@virtuslab.com>2020-07-09 10:45:06 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-07-16 13:17:39 +0200
commit04cf1cdd3a909fa62e5ffda5b7d04695c749177e (patch)
tree5c38372dd70f5528bf55c084a1893a7af8e41359 /core
parent42c6bcdbd564628907491289555c6d6713294fef (diff)
downloaddokka-04cf1cdd3a909fa62e5ffda5b7d04695c749177e.tar.gz
dokka-04cf1cdd3a909fa62e5ffda5b7d04695c749177e.tar.bz2
dokka-04cf1cdd3a909fa62e5ffda5b7d04695c749177e.zip
Implement javadoc search
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/model/doc/DocTag.kt1
-rw-r--r--core/src/main/kotlin/pages/ContentNodes.kt2
-rw-r--r--core/src/main/kotlin/utilities/Html.kt5
3 files changed, 6 insertions, 2 deletions
diff --git a/core/src/main/kotlin/model/doc/DocTag.kt b/core/src/main/kotlin/model/doc/DocTag.kt
index 069bbcab..dc2cd2be 100644
--- a/core/src/main/kotlin/model/doc/DocTag.kt
+++ b/core/src/main/kotlin/model/doc/DocTag.kt
@@ -92,4 +92,5 @@ class DocumentationLink(val dri: DRI, children: List<DocTag> = emptyList(), para
override fun hashCode(): Int = super.hashCode() + dri.hashCode()
}
object HorizontalRule : DocTag(emptyList(), emptyMap())
+class Index(children: List<DocTag> = emptyList(), params: Map<String, String> = emptyMap()) : DocTag(children, params)
class CustomDocTag(children: List<DocTag> = emptyList(), params: Map<String, String> = emptyMap()) : DocTag(children, params)
diff --git a/core/src/main/kotlin/pages/ContentNodes.kt b/core/src/main/kotlin/pages/ContentNodes.kt
index 6a6d3e22..5129dfcf 100644
--- a/core/src/main/kotlin/pages/ContentNodes.kt
+++ b/core/src/main/kotlin/pages/ContentNodes.kt
@@ -246,7 +246,7 @@ enum class TextStyle : Style {
}
enum class ContentStyle : Style {
- RowTitle, TabbedContent, WithExtraAttributes, RunnableSample
+ RowTitle, TabbedContent, WithExtraAttributes, RunnableSample, InDocumentationAnchor
}
object CommentTable : Style
diff --git a/core/src/main/kotlin/utilities/Html.kt b/core/src/main/kotlin/utilities/Html.kt
index 9dc032f6..3226ca9d 100644
--- a/core/src/main/kotlin/utilities/Html.kt
+++ b/core/src/main/kotlin/utilities/Html.kt
@@ -9,4 +9,7 @@ import java.net.URLEncoder
*/
fun String.htmlEscape(): String = replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
-fun String.urlEncoded(): String = URLEncoder.encode(this, "UTF-8") \ No newline at end of file
+fun String.urlEncoded(): String = URLEncoder.encode(this, "UTF-8")
+
+fun String.formatToEndWithHtml() =
+ if (endsWith(".html") || contains(Regex("\\.html#"))) this else "$this.html" \ No newline at end of file