3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 18:40:05 +01:00

[Doctools] Fix //rotate description quoting

Dieser Commit ist enthalten in:
Kenzie Togami 2019-08-26 00:17:22 -07:00
Ursprung 0620478763
Commit 7af397bd56
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 5D200B325E157A81
2 geänderte Dateien mit 10 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -2,6 +2,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.3.41"
application
}
applyCommonConfiguration()
@ -10,6 +11,11 @@ tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
application.mainClassName = "com.sk89q.worldedit.internal.util.DocumentationPrinter"
tasks.named<JavaExec>("run") {
workingDir = rootProject.projectDir
}
dependencies {
"implementation"(project(":worldedit-libs:core:ap"))
"implementation"(project(":worldedit-core"))

Datei anzeigen

@ -60,7 +60,9 @@ class DocumentationPrinter private constructor() {
private suspend inline fun <reified T> SequenceScope<String>.yieldAllCommandsIn() {
val sourceFile = Paths.get("worldedit-core/src/main/java/" + T::class.qualifiedName!!.replace('.', '/') + ".java")
require(Files.exists(sourceFile)) { "Source not found for ${T::class.qualifiedName}"}
require(Files.exists(sourceFile)) {
"Source not found for ${T::class.qualifiedName}, looked at ${sourceFile.toAbsolutePath()}"
}
Files.newBufferedReader(sourceFile).useLines { lines ->
var inCommand = false
for (line in lines) {
@ -267,7 +269,7 @@ Other Permissions
""".trimMargin())
cmdOutput.appendln()
for ((k, v) in entries) {
val rstSafe = v.replace("\"", "\\\"").replace("\n", "\n" + " ".repeat(2))
val rstSafe = v.trim().replace("\"", "\\\"").replace("\n", "\n" + " ".repeat(2))
.lineSequence().map { line -> line.ifBlank { "" } }.joinToString(separator = "\n")
cmdOutput.append(" ".repeat(2))
.append(k)