We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 257a21a commit 1d41f28Copy full SHA for 1d41f28
src/main/kotlin/kscript/app/Kscript.kt
@@ -181,8 +181,9 @@ fun main(args: Array<String>) {
181
}
182
183
// Capitalize first letter and get rid of dashes (since this is what kotlin compiler is doing for the wrapper to create a valid java class name)
184
+ // For valid characters see https://stackoverflow.com/questions/4814040/allowed-characters-in-filename
185
val className = scriptFile.nameWithoutExtension
- .replace("[.-]".toRegex(), "_")
186
+ .replace("[^A-Za-z0-9]".toRegex(), "_")
187
.capitalize()
188
189
0 commit comments