mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
minor mkdoc name sanitation fix
This commit is contained in:
parent
19dfc50d10
commit
d361a57863
@ -157,7 +157,10 @@ def extract(filename, node, prefix, output):
|
||||
if node.kind in PRINT_LIST:
|
||||
comment = d(node.raw_comment) if node.raw_comment is not None else ''
|
||||
comment = process_comment(comment)
|
||||
name = sanitize_name(prefix + '_' + d(node.spelling))
|
||||
sub_prefix = prefix
|
||||
if len(sub_prefix) > 0:
|
||||
sub_prefix += '_'
|
||||
name = sanitize_name(sub_prefix + d(node.spelling))
|
||||
output.append('\nstatic const char *%s = %sR"doc(%s)doc";' % (name, '\n' if '\n' in comment else '', comment))
|
||||
num_extracted += 1
|
||||
return num_extracted
|
||||
|
Loading…
Reference in New Issue
Block a user