Fix uniques.md being generated with wrong line endings (#6825)

In the repository, this file definitely has Unix line endings (\n). So generating it with \r\n causes it to always show changes, even though there aren't any
This commit is contained in:
Timo T 2022-05-16 08:50:38 +02:00 committed by GitHub
parent 96780be1d2
commit 68a0e25c9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ class UniqueDocsWriter {
// `val paramExamples = uniqueType.parameterTypeMap.map { it.joinToString("/") { pt -> pt.docExample } }.toTypedArray()`
// Might confuse modders to think "/" can go into the _actual_ unique and mean "or", so better show just one ("Farm" in the example above):
val paramExamples = uniqueType.parameterTypeMap.map { it.first().docExample }.toTypedArray()
lines += "\tExample: \"${uniqueText.fillPlaceholders(*paramExamples)}\"\r\n"
lines += "\tExample: \"${uniqueText.fillPlaceholders(*paramExamples)}\"\n"
}
lines += "\tApplicable to: " + uniqueType.allTargets().sorted().joinToString()
lines += ""
@ -87,7 +87,6 @@ class UniqueDocsWriter {
lines += "*[${paramType.parameterName}]: ${paramType.docDescription}$punctuation"
}
// Let's use CRLF ending same as in all other files
File("../../docs/Modders/uniques.md").writeText(lines.joinToString("\r\n"))
File("../../docs/Modders/uniques.md").writeText(lines.joinToString("\n"))
}
}