aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/doxygen_basic_translate_style2_runme.py
diff options
context:
space:
mode:
authorJohn McFarland <mcfarljm@gmail.com>2019-06-04 16:55:54 -0500
committerJohn McFarland <mcfarljm@gmail.com>2019-06-18 17:12:08 -0500
commitdaad5d664d745c15657de19e6509f1e189e01109 (patch)
tree3715da1a66d5568c4084500696b3f9b1706098c7 /Examples/test-suite/python/doxygen_basic_translate_style2_runme.py
parent347656566510344f4eb8a772d83afd17699d5f60 (diff)
downloadswig-daad5d664d745c15657de19e6509f1e189e01109.tar.gz
Ensure empty line before code and math blocks in doxygen pydoc
Sphinx requires an empty line before code and math blocks, whereas doxygen does not. This update ensures that a blank line is included before generated code and math blocks in the pydoc output. This is done by post-processing the docstring line by line to check whether any newlines need to be added. This way, if the original doxygen source already includes an empty line before a block, an additional unnecessary empty line is not added. Updating the expected test output for doxygen_basic_translate, which now adds the necessary empty line before the code block. Adding further test cases to doxygen_translate_all_tags to explicitly verify that a newline is added in the pydoc output before both code and math blocks that appear within a paragraph. Additionally, empty lines previously appearing at the beginning of the generated docstrings are now removed. This does not alter the behavior of the tests.
Diffstat (limited to 'Examples/test-suite/python/doxygen_basic_translate_style2_runme.py')
-rw-r--r--Examples/test-suite/python/doxygen_basic_translate_style2_runme.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Examples/test-suite/python/doxygen_basic_translate_style2_runme.py b/Examples/test-suite/python/doxygen_basic_translate_style2_runme.py
index f7d68f410..2d62eecbd 100644
--- a/Examples/test-suite/python/doxygen_basic_translate_style2_runme.py
+++ b/Examples/test-suite/python/doxygen_basic_translate_style2_runme.py
@@ -44,6 +44,7 @@ Title: Minuses:
* it\'s null
Warning: This may not work as expected
+
.. code-block:: c++
int main() { while(true); }