But use its name instead.
compound.kind = compounddef.attrib['kind']
# Compound name is page filename, so we have to use title there. The same
# is for groups.
- compound.name = html.escape(compounddef.find('title').text if compound.kind in ['page', 'group'] else compounddef.find('compoundname').text)
+ compound.name = html.escape(compounddef.find('title').text if compound.kind in ['page', 'group'] and compounddef.findtext('title') else compounddef.find('compoundname').text)
compound.url = compound.id + '.html'
compound.brief = parse_desc(state, compounddef.find('briefdescription'))
# Groups are explicitly created so they *have details*, other things need
compound.id = compounddef.attrib['id']
# Compound name is page filename, so we have to use title there. The same
# is for groups.
- compound.name = compounddef.find('title').text if compound.kind in ['page', 'group'] else compounddef.find('compoundname').text
+ compound.name = compounddef.find('title').text if compound.kind in ['page', 'group'] and compounddef.findtext('title') else compounddef.find('compoundname').text
# Compound URL is ID, except for index page
compound.url = (compounddef.find('compoundname').text if compound.kind == 'page' else compound.id) + '.html'
compound.has_template_details = False
--- /dev/null
+INPUT = input.dox
+QUIET = YES
+GENERATE_HTML = NO
+GENERATE_LATEX = NO
+GENERATE_XML = YES
+
+M_PAGE_FINE_PRINT =
+M_THEME_COLOR =
+M_LINKS_NAVBAR1 =
+M_LINKS_NAVBAR2 =
+M_SEARCH_DISABLED = YES
--- /dev/null
+/** @page untitled
+
+An untitled page.
+*/
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>untitled | 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-9 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>
+ untitled
+ </h1>
+<p>An untitled page.</p>
+ </div>
+ </div>
+ </div>
+</article></main>
+</body>
+</html>
def test(self):
self.run_dox2html5(wildcard='indexpage.xml')
self.assertEqual(*self.actual_expected_contents('index.html'))
+
+class EmptyTitle(IntegrationTestCase):
+ def __init__(self, *args, **kwargs):
+ super().__init__(__file__, 'empty_title', *args, **kwargs)
+
+ def test(self):
+ self.run_dox2html5(wildcard='untitled.xml')
+ self.assertEqual(*self.actual_expected_contents('untitled.html'))