if i.tag == 'ref':
out += parse_ref(state, i)
elif i.tag == 'anchor':
- # Anchor, used for example in deprecated/todo lists. Its base_url
- # is always equal to base_url of the page.
+ # Anchor, used by <= 1.8.14 for deprecated/todo lists. Its base_url
+ # is always equal to base_url of the page. In 1.8.15 the anchor is
+ # in the description, making the anchor look extra awful:
+ # https://github.com/doxygen/doxygen/pull/6587
+ # TODO: this should get reverted and fixed properly so the
+ # one-on-one case works as it should
out += '<a name="{}"></a>'.format(extract_id_hash(state, i))
else: # pragma: no cover
logging.warning("{}: ignoring {} in <type>".format(state.current, i.tag))
<h1>
Just old
</h1>
-<dl class="m-dox"><dt><a name="_old000004"></a>Member <a href="File_8h.html#a14bcd2d544b22300bba3863251393e0f" class="m-dox">foo</a> ()</dt><dd><p>Xrefitem, gets merged</p><p>with this one by Doxygen itself.</p></dd><dt><a name="_old000001"></a>page <a href="index.html" class="m-dox">Main Page</a></dt><dd><p>This is old.</p><p>This is not merged.</p><p>With this. Only on the listing page.</p></dd></dl>
+<dl class="m-dox"><dt>Member <a href="File_8h.html#a14bcd2d544b22300bba3863251393e0f" class="m-dox">foo</a> ()</dt><dd><p><a name="_old000004"></a> Xrefitem, gets merged</p><p>with this one by Doxygen itself.</p></dd><dt>page <a href="index.html" class="m-dox">Main Page</a></dt><dd><p><a name="_old000001"></a> This is old.</p><p><a name="_old000002"></a> This is not merged.</p><p><a name="_old000003"></a> With this. Only on the listing page.</p></dd></dl>
</div>
</div>
</div>
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>Just old | My Project</title>
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
+ <link rel="stylesheet" href="m-dark+doxygen.compiled.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+</head>
+<body>
+<header><nav id="navigation">
+ <div class="m-container">
+ <div class="m-row">
+ <a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Project</a>
+ </div>
+ </div>
+</nav></header>
+<main><article>
+ <div class="m-container m-container-inflatable">
+ <div class="m-row">
+ <div class="m-col-l-10 m-push-l-1">
+ <h1>
+ Just old
+ </h1>
+<dl class="m-dox"><dt><a name="_old000004"></a>Member <a href="File_8h.html#a14bcd2d544b22300bba3863251393e0f" class="m-dox">foo</a> ()</dt><dd><p>Xrefitem, gets merged</p><p>with this one by Doxygen itself.</p></dd><dt><a name="_old000001"></a>page <a href="index.html" class="m-dox">Main Page</a></dt><dd><p>This is old.</p><p>This is not merged.</p><p>With this. Only on the listing page.</p></dd></dl>
+ </div>
+ </div>
+ </div>
+</article></main>
+</body>
+</html>
<h1>
Todo List
</h1>
-<dl class="m-dox"><dt><a name="_todo000001"></a>page <a href="index.html" class="m-dox">Main Page</a></dt><dd>Or a TODO.</dd><dt><a name="_todo000002"></a>Page <a href="other.html" class="m-dox">Other page</a></dt><dd>Diffferent TODO</dd></dl>
+<dl class="m-dox"><dt>page <a href="index.html" class="m-dox">Main Page</a></dt><dd><a name="_todo000001"></a>Or a TODO.</dd><dt>Page <a href="other.html" class="m-dox">Other page</a></dt><dd><a name="_todo000002"></a>Diffferent TODO</dd></dl>
</div>
</div>
</div>
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>Todo List | My Project</title>
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
+ <link rel="stylesheet" href="m-dark+doxygen.compiled.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+</head>
+<body>
+<header><nav id="navigation">
+ <div class="m-container">
+ <div class="m-row">
+ <a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Project</a>
+ </div>
+ </div>
+</nav></header>
+<main><article>
+ <div class="m-container m-container-inflatable">
+ <div class="m-row">
+ <div class="m-col-l-10 m-push-l-1">
+ <h1>
+ Todo List
+ </h1>
+<dl class="m-dox"><dt><a name="_todo000001"></a>page <a href="index.html" class="m-dox">Main Page</a></dt><dd>Or a TODO.</dd><dt><a name="_todo000002"></a>Page <a href="other.html" class="m-dox">Other page</a></dt><dd>Diffferent TODO</dd></dl>
+ </div>
+ </div>
+ </div>
+</article></main>
+</body>
+</html>
def test(self):
self.run_dox2html5(wildcard='*.xml')
self.assertEqual(*self.actual_expected_contents('index.html'))
- self.assertEqual(*self.actual_expected_contents('todo.html'))
# Multiple xrefitems should be merged into one
self.assertEqual(*self.actual_expected_contents('File_8h.html'))
+
+ @unittest.skipUnless(LooseVersion(doxygen_version()) > LooseVersion("1.8.14"),
+ "https://github.com/doxygen/doxygen/pull/6587 fucking broke this")
+ def test_xrefitem1814(self):
+ self.run_dox2html5(wildcard='*.xml')
+ self.assertEqual(*self.actual_expected_contents('todo.html'))
self.assertEqual(*self.actual_expected_contents('old.html'))
+ @unittest.skipUnless(LooseVersion(doxygen_version()) <= LooseVersion("1.8.14"),
+ "https://github.com/doxygen/doxygen/pull/6587 fucking broke this")
+ def test_xrefitem(self):
+ self.run_dox2html5(wildcard='*.xml')
+ self.assertEqual(*self.actual_expected_contents('todo.html', 'todo_1814.html'))
+ self.assertEqual(*self.actual_expected_contents('old.html', 'old_1814.html'))
+
class Code(IntegrationTestCase):
def __init__(self, *args, **kwargs):
super().__init__(__file__, 'code', *args, **kwargs)