Skip to content

Commit 50ed564

Browse files
authored
Fix doxygen commands (warning and add note) (#35)
1 parent 0810857 commit 50ed564

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pybind11_mkdoc/mkdoc_lib.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ def process_comment(comment):
153153
s = re.sub(r'[\\@]code\s?(.*?)\s?[\\@]endcode',
154154
r"```\n\1\n```\n", s, flags=re.DOTALL)
155155
s = re.sub(r'[\\@]warning\s?(.*?)\s?\n\n',
156-
r'$.. warning::\n\n\1\n\n', s, flags=re.DOTALL)
156+
r'\n\n$.. warning::\n\n\1\n\n', s, flags=re.DOTALL)
157+
s = re.sub(r'[\\@]note\s?(.*?)\s?\n\n',
158+
r'\n\n$.. note::\n\n\1\n\n', s, flags=re.DOTALL)
157159
# Deprecated expects a version number for reST and not for Doxygen. Here the first word of the
158160
# doxygen directives is assumed to correspond to the version number
159161
s = re.sub(r'[\\@]deprecated\s(.*?)\s?(.*?)\s?\n\n',

0 commit comments

Comments
 (0)