chiark / gitweb /
doxygen: some awful autobrief stuff actually got fixed.
authorVladimír Vondruš <mosra@centrum.cz>
Sat, 29 Dec 2018 23:29:26 +0000 (00:29 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Sat, 29 Dec 2018 23:29:26 +0000 (00:29 +0100)
But it's still a dumpster fire.

doxygen/dox2html5.py
doxygen/test/test_contents.py

index 6941cd9f3284f89f569ee4deb22e78f25399aabe..c84aaacf13adb0785b9fb20ace43f551293e8594 100755 (executable)
@@ -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 <heading> 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('<p>') 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 <hr> there
+            # anymore)
             elif paragraph_count == 1 and out.parsed:
                 assert out.parsed.startswith('<p>') and out.parsed.endswith('</p>')
                 out.parsed = out.parsed[3:-4]
index 095e9a8074aa29177a986c57fd59eb4ab598986a..12eec7ab45e97b5a13640e28fdcbf90613321840 100644 (file)
@@ -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 <hruler> into <briefdescription> 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 <heading> into <briefdescription> anymore")
     def test(self):
         self.run_dox2html5(wildcard='namespaceNamespace.xml')
         self.assertEqual(*self.actual_expected_contents('namespaceNamespace.html'))