From a366f7b4ef34d3f44526016a940c64799765a0c9 Mon Sep 17 00:00:00 2001 From: Geoffrey Challen Date: Thu, 10 Jun 2021 22:56:23 -0500 Subject: [PATCH] Scrub Windows line endings. --- build.gradle.kts | 2 +- plugin/src/main/kotlin/save/ParseJava.kt | 2 +- plugin/src/main/kotlin/save/ParseKotlin.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index daaf5c2..5ea6fd6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ plugins { } subprojects { group = "com.github.cs125-illinois.questioner" - version = "2021.6.2" + version = "2021.6.3" tasks.withType { val javaVersion = JavaVersion.VERSION_1_8.toString() sourceCompatibility = javaVersion diff --git a/plugin/src/main/kotlin/save/ParseJava.kt b/plugin/src/main/kotlin/save/ParseJava.kt index 73569b6..26737cd 100644 --- a/plugin/src/main/kotlin/save/ParseJava.kt +++ b/plugin/src/main/kotlin/save/ParseJava.kt @@ -30,7 +30,7 @@ import org.intellij.markdown.html.HtmlGenerator import java.io.File data class ParsedJavaFile(val path: String, val contents: String) { - constructor(file: File) : this(file.path, file.readText()) + constructor(file: File) : this(file.path, file.readText().replace("\r\n", "\n")) init { require(path.endsWith(".java")) { "Can only parse Java files" } diff --git a/plugin/src/main/kotlin/save/ParseKotlin.kt b/plugin/src/main/kotlin/save/ParseKotlin.kt index 02e420d..3de152c 100644 --- a/plugin/src/main/kotlin/save/ParseKotlin.kt +++ b/plugin/src/main/kotlin/save/ParseKotlin.kt @@ -22,7 +22,7 @@ import org.intellij.markdown.html.HtmlGenerator import java.io.File data class ParsedKotlinFile(val path: String, val contents: String) { - constructor(file: File) : this(file.path, file.readText()) + constructor(file: File) : this(file.path, file.readText().replace("\r\n", "\n")) init { require(path.endsWith(".kt")) { "Can only parse Kotlin files" }