diff options
author | Marcin Aman <maman@virtuslab.com> | 2020-07-09 10:45:06 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-07-16 13:17:39 +0200 |
commit | 04cf1cdd3a909fa62e5ffda5b7d04695c749177e (patch) | |
tree | 5c38372dd70f5528bf55c084a1893a7af8e41359 /core/src/main/kotlin/utilities/Html.kt | |
parent | 42c6bcdbd564628907491289555c6d6713294fef (diff) | |
download | dokka-04cf1cdd3a909fa62e5ffda5b7d04695c749177e.tar.gz dokka-04cf1cdd3a909fa62e5ffda5b7d04695c749177e.tar.bz2 dokka-04cf1cdd3a909fa62e5ffda5b7d04695c749177e.zip |
Implement javadoc search
Diffstat (limited to 'core/src/main/kotlin/utilities/Html.kt')
-rw-r--r-- | core/src/main/kotlin/utilities/Html.kt | 5 |
1 files changed, 4 insertions, 1 deletions
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("&", "&").replace("<", "<").replace(">", ">") -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 |