mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-12 04:23:54 +00:00
some codestyle application
This commit is contained in:
@ -291,10 +291,10 @@ Other Permissions
|
||||
}
|
||||
|
||||
private fun String.makeRstSafe(lineJoiner: String) = trim()
|
||||
.replace("\"", "\\\"").replace("\n", "\n" + " ".repeat(2))
|
||||
.lineSequence()
|
||||
.map { line -> line.ifBlank { "" } }
|
||||
.joinToString(separator = lineJoiner)
|
||||
.replace("\"", "\\\"").replace("\n", "\n" + " ".repeat(2))
|
||||
.lineSequence()
|
||||
.map { line -> line.ifBlank { "" } }
|
||||
.joinToString(separator = lineJoiner)
|
||||
|
||||
private fun linkSafe(text: String) = text.replace(" ", "-")
|
||||
|
||||
|
@ -53,8 +53,8 @@ private fun formatAsRst(component: Component, currentDeco: String? = null): Char
|
||||
deco?.let {
|
||||
require(currentDeco == null) {
|
||||
"Nested decorations are hell in RST. \n" +
|
||||
"Existing: $currentDeco; New: $deco\n" +
|
||||
"Offender: ${TextHelper.reduceToText(component)}"
|
||||
"Existing: $currentDeco; New: $deco\n" +
|
||||
"Offender: ${TextHelper.reduceToText(component)}"
|
||||
}
|
||||
content.rstDeco(deco)
|
||||
}
|
||||
|
Reference in New Issue
Block a user