mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
[Doctools] Fix //rotate description quoting
This commit is contained in:
parent
0620478763
commit
7af397bd56
@ -2,6 +2,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "1.3.41"
|
kotlin("jvm") version "1.3.41"
|
||||||
|
application
|
||||||
}
|
}
|
||||||
|
|
||||||
applyCommonConfiguration()
|
applyCommonConfiguration()
|
||||||
@ -10,6 +11,11 @@ tasks.withType<KotlinCompile> {
|
|||||||
kotlinOptions.jvmTarget = "1.8"
|
kotlinOptions.jvmTarget = "1.8"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
application.mainClassName = "com.sk89q.worldedit.internal.util.DocumentationPrinter"
|
||||||
|
tasks.named<JavaExec>("run") {
|
||||||
|
workingDir = rootProject.projectDir
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"implementation"(project(":worldedit-libs:core:ap"))
|
"implementation"(project(":worldedit-libs:core:ap"))
|
||||||
"implementation"(project(":worldedit-core"))
|
"implementation"(project(":worldedit-core"))
|
||||||
|
@ -60,7 +60,9 @@ class DocumentationPrinter private constructor() {
|
|||||||
|
|
||||||
private suspend inline fun <reified T> SequenceScope<String>.yieldAllCommandsIn() {
|
private suspend inline fun <reified T> SequenceScope<String>.yieldAllCommandsIn() {
|
||||||
val sourceFile = Paths.get("worldedit-core/src/main/java/" + T::class.qualifiedName!!.replace('.', '/') + ".java")
|
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 ->
|
Files.newBufferedReader(sourceFile).useLines { lines ->
|
||||||
var inCommand = false
|
var inCommand = false
|
||||||
for (line in lines) {
|
for (line in lines) {
|
||||||
@ -267,7 +269,7 @@ Other Permissions
|
|||||||
""".trimMargin())
|
""".trimMargin())
|
||||||
cmdOutput.appendln()
|
cmdOutput.appendln()
|
||||||
for ((k, v) in entries) {
|
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")
|
.lineSequence().map { line -> line.ifBlank { "" } }.joinToString(separator = "\n")
|
||||||
cmdOutput.append(" ".repeat(2))
|
cmdOutput.append(" ".repeat(2))
|
||||||
.append(k)
|
.append(k)
|
||||||
|
Loading…
Reference in New Issue
Block a user