parent
f400b5c26b
commit
8fd1ed6dfe
1 changed files with 3 additions and 1 deletions
|
|
@ -55,7 +55,9 @@ proc beautifyName(s: string, k: TSymKind): string =
|
||||||
inc i
|
inc i
|
||||||
while i < s.len:
|
while i < s.len:
|
||||||
if s[i] == '_':
|
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'
|
# don't skip '_' as it's essential for e.g. 'GC_disable'
|
||||||
result.add('_')
|
result.add('_')
|
||||||
inc i
|
inc i
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue