mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 03:32:32 +00:00
Make JS not mangle to snake_case (#14086)
This commit is contained in:
@@ -238,11 +238,7 @@ proc mangleName(m: BModule, s: PSym): Rope =
|
||||
while i < s.name.s.len:
|
||||
let c = s.name.s[i]
|
||||
case c
|
||||
of 'A'..'Z':
|
||||
if i > 0 and s.name.s[i-1] in {'a'..'z'}:
|
||||
x.add '_'
|
||||
x.add(chr(c.ord - 'A'.ord + 'a'.ord))
|
||||
of 'a'..'z', '_', '0'..'9':
|
||||
of 'A'..'Z', 'a'..'z', '_', '0'..'9':
|
||||
x.add c
|
||||
else:
|
||||
x.add("HEX" & toHex(ord(c), 2))
|
||||
|
||||
Reference in New Issue
Block a user