mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-09 22:43:34 +00:00
@@ -55,7 +55,9 @@ proc beautifyName(s: string, k: TSymKind): string =
|
||||
inc i
|
||||
while i < s.len:
|
||||
if s[i] == '_':
|
||||
if i > 0 and s[i-1] in {'A'..'Z'}:
|
||||
if i+1 >= s.len:
|
||||
discard "trailing underscores should be stripped off"
|
||||
elif i > 0 and s[i-1] in {'A'..'Z'}:
|
||||
# don't skip '_' as it's essential for e.g. 'GC_disable'
|
||||
result.add('_')
|
||||
inc i
|
||||
|
||||
Reference in New Issue
Block a user