From 7b5e78d441acca56dde92a03e719d5efb8141f35 Mon Sep 17 00:00:00 2001 From: Wayne Wanbok Choi Date: Thu, 21 Jul 2022 20:53:40 +0900 Subject: [PATCH] Make parameters removing special characters --- Sources/POEditorParser/Lib/LiteralsParser.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/POEditorParser/Lib/LiteralsParser.swift b/Sources/POEditorParser/Lib/LiteralsParser.swift index f100e5a..439fb24 100644 --- a/Sources/POEditorParser/Lib/LiteralsParser.swift +++ b/Sources/POEditorParser/Lib/LiteralsParser.swift @@ -29,7 +29,7 @@ struct Variable { - alreadyReadPages <- this should not be captialized (or we'll lose the Read and Pages capital letters) */ - let words = rawKey.split(separator: " ").map(String.init) + let words = rawKey.components(separatedBy: .alphanumerics.inverted) if words.count == 1 { return words[0].lowercaseFirst }