From: Vladimír Vondruš Date: Thu, 7 May 2020 11:28:11 +0000 (+0200) Subject: documentation/doxygen: drop handling for a Doxygen 1.8.15 bug. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=6bea7027cb2674e4c5f78a527ddab506d9785675;p=blog.git documentation/doxygen: drop handling for a Doxygen 1.8.15 bug. --- diff --git a/documentation/doxygen.py b/documentation/doxygen.py index cb12de00..03ca56a4 100755 --- a/documentation/doxygen.py +++ b/documentation/doxygen.py @@ -1599,19 +1599,13 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET. assert out.parsed.startswith('

') and out.parsed.endswith('

') out.parsed = out.parsed[3:-4] - # Sane behavior otherwise. Well, no. I give up. + # Sane behavior otherwise else: - # In 1.8.15 if @brief is followed by an @ingroup, then the - # immediately following paragraph gets merged with it for some - # freaking reason. - if paragraph_count > 1: - logging.warning("{}: brief description containing multiple paragraphs, possibly due to @ingroup following a @brief. That's not supported, ignoring the whole contents of {}".format(state.current, out.parsed)) - out.parsed = '' - else: - assert not has_block_elements and paragraph_count <= 1 - if paragraph_count == 1: - assert out.parsed.startswith('

') and out.parsed.endswith('

') - out.parsed = out.parsed[3:-4] + assert not has_block_elements and paragraph_count <= 1, \ + "{}: brief description containing multiple paragraphs, possibly due to @ingroup following a @brief in {}. This was a bug in Doxygen 1.8.15/16 and fixed since, please upgrade.".format(state.current, out.parsed) + if paragraph_count == 1: + assert out.parsed.startswith('

') and out.parsed.endswith('

') + out.parsed = out.parsed[3:-4] # Strip superfluous

for simple elments (list items, parameter and # return value description, table cells), but only if there is just a diff --git a/documentation/test_doxygen/contents_brief_multiline_ingroup/Doxyfile b/documentation/test_doxygen/contents_brief_multiline_ingroup/Doxyfile deleted file mode 100644 index bab230dc..00000000 --- a/documentation/test_doxygen/contents_brief_multiline_ingroup/Doxyfile +++ /dev/null @@ -1,15 +0,0 @@ -INPUT = File.h -QUIET = YES -GENERATE_HTML = NO -GENERATE_LATEX = NO -GENERATE_XML = YES -XML_PROGRAMLISTING = NO -CASE_SENSE_NAMES = YES - -##! M_PAGE_FINE_PRINT = -##! M_THEME_COLOR = -##! M_FAVICON = -##! M_LINKS_NAVBAR1 = -##! M_LINKS_NAVBAR2 = -##! M_SEARCH_DISABLED = YES - diff --git a/documentation/test_doxygen/contents_brief_multiline_ingroup/File.h b/documentation/test_doxygen/contents_brief_multiline_ingroup/File.h deleted file mode 100644 index deb92f4b..00000000 --- a/documentation/test_doxygen/contents_brief_multiline_ingroup/File.h +++ /dev/null @@ -1,10 +0,0 @@ -/** @defgroup thatgroup This is a group */ - -/** -@brief Function that's in a group -@ingroup thatgroup - -Lines of detailed description that get merged to the brief for no freaking -reason. -*/ -void foo(); diff --git a/documentation/test_doxygen/contents_brief_multiline_ingroup/group__thatgroup.html b/documentation/test_doxygen/contents_brief_multiline_ingroup/group__thatgroup.html deleted file mode 100644 index 13e9cf2a..00000000 --- a/documentation/test_doxygen/contents_brief_multiline_ingroup/group__thatgroup.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - This is a group module | My Project - - - - - -

-
-
-
-
-

- This is a group module

-
-
-
-
- - diff --git a/documentation/test_doxygen/test_contents.py b/documentation/test_doxygen/test_contents.py index 1b1ff18c..8be7dd0e 100644 --- a/documentation/test_doxygen/test_contents.py +++ b/documentation/test_doxygen/test_contents.py @@ -422,11 +422,3 @@ class Htmlinclude(IntegrationTestCase): def test_warnings(self): self.run_doxygen(wildcard='warnings.xml') self.assertEqual(*self.actual_expected_contents('warnings.html')) - -class BriefMultilineIngroup(IntegrationTestCase): - def __init__(self, *args, **kwargs): - super().__init__(__file__, 'brief_multiline_ingroup', *args, **kwargs) - - def test(self): - self.run_doxygen(wildcard='group__thatgroup.xml') - self.assertEqual(*self.actual_expected_contents('group__thatgroup.html'))