From f9880f7daca90063eed650e1103e1fe4db8aa1e2 Mon Sep 17 00:00:00 2001 From: Nicolas Dagoneau Date: Fri, 24 Nov 2023 17:46:35 +0100 Subject: [PATCH] Fix doxygen commands (warning and add note) --- pybind11_mkdoc/mkdoc_lib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pybind11_mkdoc/mkdoc_lib.py b/pybind11_mkdoc/mkdoc_lib.py index 0d591d4..9a13554 100755 --- a/pybind11_mkdoc/mkdoc_lib.py +++ b/pybind11_mkdoc/mkdoc_lib.py @@ -153,7 +153,9 @@ def process_comment(comment): s = re.sub(r'[\\@]code\s?(.*?)\s?[\\@]endcode', r"```\n\1\n```\n", s, flags=re.DOTALL) s = re.sub(r'[\\@]warning\s?(.*?)\s?\n\n', - r'$.. warning::\n\n\1\n\n', s, flags=re.DOTALL) + r'\n\n$.. warning::\n\n\1\n\n', s, flags=re.DOTALL) + s = re.sub(r'[\\@]note\s?(.*?)\s?\n\n', + r'\n\n$.. note::\n\n\1\n\n', s, flags=re.DOTALL) # Deprecated expects a version number for reST and not for Doxygen. Here the first word of the # doxygen directives is assumed to correspond to the version number s = re.sub(r'[\\@]deprecated\s(.*?)\s?(.*?)\s?\n\n',