From f6f24877d48d72e9109df1805a590aa52bcd0fd7 Mon Sep 17 00:00:00 2001 From: uzzu Date: Sat, 29 Oct 2022 22:07:43 +0900 Subject: [PATCH] CI test --- build.gradle.kts | 1 + plugin/src/main/kotlin/co/uzzu/dotenv/DotEnvParser.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 3c6a154..9611198 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,6 +20,7 @@ ktlint { ignoreFailures.set(true) } + subprojects { apply(plugin = "org.jlleitschuh.gradle.ktlint") ktlint { diff --git a/plugin/src/main/kotlin/co/uzzu/dotenv/DotEnvParser.kt b/plugin/src/main/kotlin/co/uzzu/dotenv/DotEnvParser.kt index 6ee288e..2ae2dc9 100644 --- a/plugin/src/main/kotlin/co/uzzu/dotenv/DotEnvParser.kt +++ b/plugin/src/main/kotlin/co/uzzu/dotenv/DotEnvParser.kt @@ -6,6 +6,7 @@ object DotEnvParser { private val keyValRegex = Regex("""^\s*([\w.-]+)\s*=\s*(.*)?\s*$""") private val newLinesMatches = Regex("""\n|\r|\r\n""") + fun parse(text: String): Map = text .split(newLinesMatches)