From 39631054c58df5841ea268b7002b820ec55f6e0a Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Thu, 3 Dec 2015 16:22:11 +0100 Subject: restructure Dokka build to use Gradle for everything except for the Maven plugin --- src/Formats/KotlinWebsiteFormatService.kt | 121 ------------------------------ 1 file changed, 121 deletions(-) delete mode 100644 src/Formats/KotlinWebsiteFormatService.kt (limited to 'src/Formats/KotlinWebsiteFormatService.kt') diff --git a/src/Formats/KotlinWebsiteFormatService.kt b/src/Formats/KotlinWebsiteFormatService.kt deleted file mode 100644 index 4eda7910..00000000 --- a/src/Formats/KotlinWebsiteFormatService.kt +++ /dev/null @@ -1,121 +0,0 @@ -package org.jetbrains.dokka - -import com.google.inject.Inject - -public class KotlinWebsiteFormatService @Inject constructor(locationService: LocationService, - signatureGenerator: LanguageService) -: JekyllFormatService(locationService, signatureGenerator, "html") { - private var needHardLineBreaks = false - - override fun appendFrontMatter(nodes: Iterable, to: StringBuilder) { - super.appendFrontMatter(nodes, to) - to.appendln("layout: api") - } - - override public fun formatBreadcrumbs(items: Iterable): String { - items.drop(1) - - if (items.count() > 1) { - return "
" + - items.map { formatLink(it) }.joinToString(" / ") + - "
" - } - - return "" - } - - override public fun formatCode(code: String): String = if (code.length > 0) "$code" else "" - - override fun formatStrikethrough(text: String): String = "$text" - - override fun appendAsSignature(to: StringBuilder, node: ContentNode, block: () -> Unit) { - val contentLength = node.textLength - if (contentLength == 0) return - to.append("
") - needHardLineBreaks = contentLength >= 62 - try { - block() - } finally { - needHardLineBreaks = false - } - to.append("
") - } - - override fun appendAsOverloadGroup(to: StringBuilder, block: () -> Unit) { - to.append("
\n") - block() - to.append("
\n") - } - - override fun formatLink(text: String, href: String): String { - return "${text}" - } - - override fun appendTable(to: StringBuilder, body: () -> Unit) { - to.appendln("") - body() - to.appendln("
") - } - - override fun appendTableHeader(to: StringBuilder, body: () -> Unit) { - to.appendln("") - body() - to.appendln("") - } - - override fun appendTableBody(to: StringBuilder, body: () -> Unit) { - to.appendln("") - body() - to.appendln("") - } - - override fun appendTableRow(to: StringBuilder, body: () -> Unit) { - to.appendln("") - body() - to.appendln("") - } - - override fun appendTableCell(to: StringBuilder, body: () -> Unit) { - to.appendln("") - body() - to.appendln("\n") - } - - override public fun appendBlockCode(to: StringBuilder, line: String, language: String) { - if (language.isNotEmpty()) { - super.appendBlockCode(to, line, language) - } else { - to.append("
")
-            to.append(line.trimStart())
-            to.append("
") - } - } - - override fun formatSymbol(text: String): String { - return "${formatText(text)}" - } - - override fun formatKeyword(text: String): String { - return "${formatText(text)}" - } - - override fun formatIdentifier(text: String, kind: IdentifierKind): String { - return "${formatText(text)}" - } - - override fun formatSoftLineBreak(): String = if (needHardLineBreaks) - "
" - else - "" - - override fun formatIndentedSoftLineBreak(): String = if (needHardLineBreaks) - "
    " - else - "" - - private fun identifierClassName(kind: IdentifierKind) = when(kind) { - IdentifierKind.ParameterName -> "parameterName" - IdentifierKind.SummarizedTypeName -> "summarizedTypeName" - else -> "identifier" - } -} -- cgit