aboutsummaryrefslogtreecommitdiff
path: root/src/Formats/HtmlFormatService.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-26 19:34:49 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-26 19:34:49 +0100
commit44cef5ccc67c329ea2184aa00e8dc9eac5ca7f77 (patch)
tree1e389e8e9a91862e94b5901d7ee3d46c9d6bd42c /src/Formats/HtmlFormatService.kt
parent4f59034a9436ff23b021a878dba753b67d62b742 (diff)
downloaddokka-44cef5ccc67c329ea2184aa00e8dc9eac5ca7f77.tar.gz
dokka-44cef5ccc67c329ea2184aa00e8dc9eac5ca7f77.tar.bz2
dokka-44cef5ccc67c329ea2184aa00e8dc9eac5ca7f77.zip
syntax highlight code examples
Diffstat (limited to 'src/Formats/HtmlFormatService.kt')
-rw-r--r--src/Formats/HtmlFormatService.kt8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/Formats/HtmlFormatService.kt b/src/Formats/HtmlFormatService.kt
index 46e4be4a..a3cea96a 100644
--- a/src/Formats/HtmlFormatService.kt
+++ b/src/Formats/HtmlFormatService.kt
@@ -22,18 +22,12 @@ public open class HtmlFormatService(locationService: LocationService,
return "<span class=\"identifier\">${formatText(text)}</span>"
}
- override fun appendBlockCode(to: StringBuilder, line: String) {
+ override fun appendBlockCode(to: StringBuilder, line: String, language: String) {
to.append("<pre><code>")
to.append(line)
to.append("</code></pre>")
}
- override fun appendBlockCode(to: StringBuilder, lines: Iterable<String>) {
- to.append("<pre><code>")
- to.append(lines.join("\n"))
- to.append("</code></pre>")
- }
-
override fun appendHeader(to: StringBuilder, text: String, level: Int) {
to.appendln("<h$level>${text}</h$level>")
}