aboutsummaryrefslogtreecommitdiff
path: root/src/Utilities
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-07-15 18:23:15 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-07-15 18:23:15 +0400
commitfb41c698ae26774e6bf71a0ed49b46c57c4023a9 (patch)
treea59f30756c79fad626770d9a32b97c49c14f9ef9 /src/Utilities
parenteebfdd41acc897ba9177f1c8daa428a079c8e99f (diff)
downloaddokka-fb41c698ae26774e6bf71a0ed49b46c57c4023a9.tar.gz
dokka-fb41c698ae26774e6bf71a0ed49b46c57c4023a9.tar.bz2
dokka-fb41c698ae26774e6bf71a0ed49b46c57c4023a9.zip
Improve rendering of lambdas, escape html symbols.
Diffstat (limited to 'src/Utilities')
-rw-r--r--src/Utilities/Html.kt7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Utilities/Html.kt b/src/Utilities/Html.kt
index a4fd5fae..9630c8cb 100644
--- a/src/Utilities/Html.kt
+++ b/src/Utilities/Html.kt
@@ -1,4 +1,9 @@
package org.jetbrains.dokka
-fun String.htmlEscape() = replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+
+/**
+ * Replaces symbols reserved in HTML with their respective entities.
+ * Replaces & with &amp;, < with &lt; and > with &gt;
+ */
+public fun String.htmlEscape(): String = replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")