minor mkdoc name sanitation fix
diff --git a/tools/mkdoc.py b/tools/mkdoc.py
index add11d4..f5df698 100644
--- a/tools/mkdoc.py
+++ b/tools/mkdoc.py
@@ -157,7 +157,10 @@
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