1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 08:25:58 +01:00

Fix conditional issue in generator script.

Bump version.
This commit is contained in:
Mark VanderVoord
2021-01-26 08:59:27 -05:00
parent d8eb8414f4
commit 0b899aec14
2 changed files with 3 additions and 6 deletions

View File

@@ -171,11 +171,8 @@ class UnityModuleGenerator
def neutralize_filename(name, start_cap = true)
return name if name.empty?
name = name.split(/(?:\s+|_|(?=[A-Z][a-z]))|(?<=[a-z])(?=[A-Z])/).map { |v| v.capitalize }.join('_')
return if start_cap
name
else
name[0].downcase + name[1..-1]
end
name = name[0].downcase + name[1..-1] unless start_cap
return name
end
############################