From 429a5fed1fb99a12f2b22fb61ad6f04254995022 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 30 Dec 2018 00:29:26 +0100 Subject: [PATCH] doxygen: some awful autobrief stuff actually got fixed. But it's still a dumpster fire. --- doxygen/dox2html5.py | 9 ++++++--- doxygen/test/test_contents.py | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py index 6941cd9f..c84aaacf 100755 --- a/doxygen/dox2html5.py +++ b/doxygen/dox2html5.py @@ -1454,12 +1454,13 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET. if element.tag == 'briefdescription': # JAVADOC_AUTOBRIEF is *bad* if state.doxyfile.get('JAVADOC_AUTOBRIEF', False): - # See the contents_brief_heading test for details + # See the contents_autobrief_heading test for details (only on + # Doxygen <= 1.8.14, 1.8.15 doesn't put there anymore) if has_block_elements: logging.warning("{}: JAVADOC_AUTOBRIEF produced a brief description with block elements. That's not supported, ignoring the whole contents of {}".format(state.current, out.parsed)) out.parsed = '' - # See the contents_brief_multiline test for details + # See the contents_autobrief_multiline test for details elif paragraph_count > 1: logging.warning("{}: JAVADOC_AUTOBRIEF produced a multi-line brief description. That's not supported, using just the first paragraph of {}".format(state.current, out.parsed)) @@ -1467,7 +1468,9 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET. assert out.parsed.startswith('

') and end != -1 out.parsed = out.parsed[3:end] - # See contents_brief_hr for why I need to check for out.parsed + # See contents_autobrief_hr for why I need to check for out.parsed + # (only on Doxygen <= 1.8.14, 1.8.15 doesn't put


there + # anymore) elif paragraph_count == 1 and out.parsed: assert out.parsed.startswith('

') and out.parsed.endswith('

') out.parsed = out.parsed[3:-4] diff --git a/doxygen/test/test_contents.py b/doxygen/test/test_contents.py index 095e9a80..12eec7ab 100644 --- a/doxygen/test/test_contents.py +++ b/doxygen/test/test_contents.py @@ -292,6 +292,8 @@ class AutobriefHr(IntegrationTestCase): def __init__(self, *args, **kwargs): super().__init__(__file__, 'autobrief_hr', *args, **kwargs) + @unittest.skipUnless(LooseVersion(doxygen_version()) < LooseVersion("1.8.15"), + "1.8.15 doesn't put into anymore") def test(self): self.run_dox2html5(wildcard='namespaceNamespace.xml') self.assertEqual(*self.actual_expected_contents('namespaceNamespace.html')) @@ -308,6 +310,8 @@ class AutobriefHeading(IntegrationTestCase): def __init__(self, *args, **kwargs): super().__init__(__file__, 'autobrief_heading', *args, **kwargs) + @unittest.skipUnless(LooseVersion(doxygen_version()) < LooseVersion("1.8.15"), + "1.8.15 doesn't put into anymore") def test(self): self.run_dox2html5(wildcard='namespaceNamespace.xml') self.assertEqual(*self.actual_expected_contents('namespaceNamespace.html')) -- 2.30.2