# - <mcss:div>
# - <formula> (if block)
# - <programlisting> (if block)
+ # - <htmlonly> (if block, which is ATM always)
#
# <parameterlist> and <simplesect kind="return"> are extracted out of
# the text flow, so these are removed from this check.
end_previous_paragraph = False
# Straightforward elements
- if i.tag in ['heading', 'blockquote', 'hruler', 'xrefsect', 'variablelist', 'verbatim', 'parblock', 'preformatted', 'itemizedlist', 'orderedlist', 'image', 'dot', 'dotfile', 'table', '{http://mcss.mosra.cz/doxygen/}div']:
+ if i.tag in ['heading', 'blockquote', 'hruler', 'xrefsect', 'variablelist', 'verbatim', 'parblock', 'preformatted', 'itemizedlist', 'orderedlist', 'image', 'dot', 'dotfile', 'table', '{http://mcss.mosra.cz/doxygen/}div', 'htmlonly']:
end_previous_paragraph = True
# <simplesect> describing return type is cut out of text flow, so
assert element.tag == 'para' # is inside a paragraph :/
out.parsed += '<hr/>'
+ elif i.tag == 'htmlonly':
+ # The @htmlonly command has a block version, which is able to get
+ # rid of the wrapping paragraph. But @htmlonly is not exposed to
+ # XML. Only @htmlinclude is exposed in XML and that one is always
+ # wrapped in a paragraph. I need to submit another patch to make it
+ # less freaking insane. I guess.
+ assert element.tag in ['para', '{http://mcss.mosra.cz/doxygen/}div']
+ if i.text: out.parsed += i.text
+
# Custom <div> with CSS classes (for making dim notes etc)
elif i.tag == '{http://mcss.mosra.cz/doxygen/}div':
has_block_elements = True
--- /dev/null
+INPUT = input.dox
+EXAMPLE_PATH = .
+QUIET = YES
+GENERATE_HTML = NO
+GENERATE_LATEX = NO
+GENERATE_XML = YES
+XML_PROGRAMLISTING = NO
+
+##! M_PAGE_FINE_PRINT =
+##! M_THEME_COLOR =
+##! M_FAVICON =
+##! M_LINKS_NAVBAR1 =
+##! M_LINKS_NAVBAR2 =
+##! M_SEARCH_DISABLED = YES
--- /dev/null
+<p class="m-text m-red">This goes from a HTML file and should not be wrapped
+twice in <code><p></code>.</p>
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>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>
+ My Project
+ </h1>
+<p class="m-text m-red">This goes from a HTML file and should not be wrapped
+twice in <code><p></code>.</p>
+ </div>
+ </div>
+ </div>
+</article></main>
+</body>
+</html>
--- /dev/null
+/** @mainpage
+
+@htmlinclude file.html
+*/
+
+/** @page warnings This will produce a warning
+
+@htmlinclude nonexistent.html
+*/
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>This will produce a warning | 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>
+ This will produce a warning
+ </h1>
+ </div>
+ </div>
+ </div>
+</article></main>
+</body>
+</html>
\ No newline at end of file
def test_warnings(self):
self.run_dox2html5(wildcard='warnings.xml')
self.assertEqual(*self.actual_expected_contents('warnings.html'))
+
+class Htmlinclude(IntegrationTestCase):
+ def __init__(self, *args, **kwargs):
+ super().__init__(__file__, 'htmlinclude', *args, **kwargs)
+
+ def test(self):
+ self.run_dox2html5(wildcard='indexpage.xml')
+ self.assertEqual(*self.actual_expected_contents('index.html'))
+
+ def test_warnings(self):
+ self.run_dox2html5(wildcard='warnings.xml')
+ self.assertEqual(*self.actual_expected_contents('warnings.html'))