From 347656566510344f4eb8a772d83afd17699d5f60 Mon Sep 17 00:00:00 2001 From: John McFarland Date: Mon, 27 May 2019 13:04:15 -0500 Subject: [PATCH] Remove extra newline before code block in doxygen python output Remove a newline character that was added to the translated comments prior to the code block. This way the structure of the pydoc output more closely resembles that of the original doxygen comments. Updating tests accordingly. --- Examples/test-suite/python/doxygen_basic_translate_runme.py | 1 - .../test-suite/python/doxygen_basic_translate_style2_runme.py | 1 - Examples/test-suite/python/doxygen_translate_all_tags_runme.py | 1 - Examples/test-suite/python/doxygen_translate_runme.py | 1 - Source/Doxygen/pydoc.cxx | 1 - 5 files changed, 5 deletions(-) diff --git a/Examples/test-suite/python/doxygen_basic_translate_runme.py b/Examples/test-suite/python/doxygen_basic_translate_runme.py index b6023224d..0690aa464 100644 --- a/Examples/test-suite/python/doxygen_basic_translate_runme.py +++ b/Examples/test-suite/python/doxygen_basic_translate_runme.py @@ -46,7 +46,6 @@ Title: Minuses: * it\'s null Warning: This may not work as expected - .. code-block:: c++ int main() { while(true); } 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 2d62eecbd..f7d68f410 100644 --- a/Examples/test-suite/python/doxygen_basic_translate_style2_runme.py +++ b/Examples/test-suite/python/doxygen_basic_translate_style2_runme.py @@ -44,7 +44,6 @@ Title: Minuses: * it\'s null Warning: This may not work as expected - .. code-block:: c++ int main() { while(true); } diff --git a/Examples/test-suite/python/doxygen_translate_all_tags_runme.py b/Examples/test-suite/python/doxygen_translate_all_tags_runme.py index 78bf73870..22aec872d 100644 --- a/Examples/test-suite/python/doxygen_translate_all_tags_runme.py +++ b/Examples/test-suite/python/doxygen_translate_all_tags_runme.py @@ -34,7 +34,6 @@ Not everything works right now... 'citationword' - .. code-block:: c++ some test code""") diff --git a/Examples/test-suite/python/doxygen_translate_runme.py b/Examples/test-suite/python/doxygen_translate_runme.py index 7d127454b..d698ba873 100644 --- a/Examples/test-suite/python/doxygen_translate_runme.py +++ b/Examples/test-suite/python/doxygen_translate_runme.py @@ -20,7 +20,6 @@ Author: Zubr 'citationword' - .. code-block:: c++ some test code diff --git a/Source/Doxygen/pydoc.cxx b/Source/Doxygen/pydoc.cxx index fc210f106..f40541b00 100644 --- a/Source/Doxygen/pydoc.cxx +++ b/Source/Doxygen/pydoc.cxx @@ -496,7 +496,6 @@ void PyDocConverter::handleCode(DoxygenEntity &tag, std::string &translatedComme IndentGuard indent(translatedComment, m_indent); trimWhitespace(translatedComment); - translatedComment += '\n'; // Use the current indent for the code-block line itself. translatedComment += indent.getFirstLineIndent();