Skip to content

Commit 00012aa

Browse files
cornawjakob
authored andcommitted
Remove all the possible Doxygen-style comment block markers
Additionally, remove the trailing "*/" on single-line comments.
1 parent e260514 commit 00012aa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pybind11_mkdoc/mkdoc_lib.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ def process_comment(comment):
9292
leading_spaces = float('inf')
9393
for s in comment.expandtabs(tabsize=4).splitlines():
9494
s = s.strip()
95-
if s.startswith('/*'):
96-
s = s[2:].lstrip('*')
97-
elif s.endswith('*/'):
95+
if s.endswith('*/'):
9896
s = s[:-2].rstrip('*')
99-
elif s.startswith('///'):
100-
s = s[3:]
101-
if s.startswith('*'):
97+
if s.startswith('/*'):
98+
s = s[2:].lstrip('*!<')
99+
elif s.startswith('//'):
100+
s = s[2:].lstrip('/!<')
101+
elif s.startswith('*'):
102102
s = s[1:]
103103
if len(s) > 0:
104104
leading_spaces = min(leading_spaces, len(s) - len(s.lstrip()))

0 commit comments

Comments
 (0)