Minor bug fixes

This commit is contained in:
barsdeveloper
2022-05-04 21:28:03 +02:00
parent 5f4b35427e
commit 59eaa57217
6 changed files with 122 additions and 94 deletions

View File

@@ -203,7 +203,7 @@ export default class Utility {
static formatStringName(value) {
return value
.trim()
.replace(/(?<!\n)^(b|\n+|(?:\\r\\n)+|(?:\\n)+)/, "") // Remove leading b (for boolean values) or newlines
.replace(/^b/, "") // Remove leading b (for boolean values) or newlines
.replaceAll(/(?<=[a-z])(?=[A-Z])|_|\s+/g, " ") // Insert a space between a lowercase and uppercase letter, instead of an underscore or multiple spaces
}
}