# - <hruler>
# - <simplesect> (if not describing return type) and <xrefsect>
# - <verbatim>, <preformatted> (those are the same thing!)
+ # - <parblock> (a weird grouping thing that we abuse for <div>s)
# - <variablelist>, <itemizedlist>, <orderedlist>
# - <image>, <table>
# - <mcss:div>
end_previous_paragraph = False
# Straightforward elements
- if i.tag in ['heading', 'blockquote', 'hruler', 'xrefsect', 'variablelist', 'verbatim', 'preformatted', 'itemizedlist', 'orderedlist', 'image', 'table', '{http://mcss.mosra.cz/doxygen/}div']:
+ if i.tag in ['heading', 'blockquote', 'hruler', 'xrefsect', 'variablelist', 'verbatim', 'parblock', 'preformatted', 'itemizedlist', 'orderedlist', 'image', 'table', '{http://mcss.mosra.cz/doxygen/}div']:
end_previous_paragraph = True
# <simplesect> describing return type is cut out of text flow, so
out.parsed += '<h{0}>{1}</h{0}>'.format(h_tag_level, html.escape(i.text))
+ elif i.tag == 'parblock':
+ assert element.tag == 'para' # is inside a paragraph :/
+ has_block_elements = True
+ out.parsed += '<div{}>{}</div>'.format(
+ ' class="{}"'.format(add_css_class) if add_css_class else '',
+ parse_desc(state, i))
+
elif i.tag == 'para':
assert element.tag != 'para' # should be top-level block element
paragraph_count += 1
<h1>
My Project
</h1>
-<p>First paragraph containing some content.</p><aside class="m-note m-warning"><h4>Attention</h4><p>An attention section.</p></aside><aside class="m-note m-default"><h4>See also</h4><p>Other section.</p></aside><p>Paragraph following the sections.</p><aside class="m-note m-info"><h4>Note</h4><p>A note.</p></aside><aside class="m-note m-danger"><h4><a href="bug.html#_bug000001" class="m-dox">Bug</a></h4><p>This is a bug.</p></aside><aside class="m-note m-dim"><h4><a href="todo.html#_todo000001" class="m-dox">Todo</a></h4><p>Or a TODO.</p></aside><aside class="m-note m-danger"><h4><a href="deprecated.html#_deprecated000001" class="m-dox">Deprecated</a></h4><p>Which is deprecated.</p></aside><aside class="m-note m-default"><h4><a href="old.html#_old000001" class="m-dox">Old stuff</a></h4><p>This is old.</p></aside><blockquote><p>A blockquote</p></blockquote><p>Text right after that blockquote should be a new paragraph.</p><ul><li>A simple</li><li>List<ol><li>With one line</li><li>for each</li></ol></li><li>item, so paragraphs are removed</li></ul><ul><li>A simple</li><li>List<ol><li>With the sublist delimited</li><li>by blank lines</li></ol></li><li>should behave the same as above</li></ul><ul><li><p>A new list</p><p>of multiple</p><p>paragraphs.</p></li><li><p>Another item</p><ul><li><p>A sub list</p><p>Another paragraph</p></li></ul></li></ul><p>A paragraph after that list.</p><table class="m-table"><thead><tr><th>Table header</th><th>Another</th><th>Third</th></tr></thead><tbody><tr><td>Cell</td><td>Another cell</td><td>3rd</td></tr><tr><td>Next row</td><td></td><td>This</td></tr><tr><td>is a table</td><td><em>really</em></td><td>yes.</td></tr></tbody></table><table class="m-table"><caption>Table <em>caption</em></caption><thead><tr><th>Table</th><th>with</th></tr><tr><th>two</th><th>row</th></tr></thead><tbody><tr><td>table</td><td>header</td></tr></tbody></table><aside class="m-note m-warning"><h4>Attention</h4><p>Attention, first paragraph.</p><p>Attention, second paragraph.</p><p>Attention, third paragraph.</p></aside><aside class="m-note m-info"><h4>Note</h4><p>A note, not merged with the above.</p></aside><aside class="m-note m-default"><h4><a href="old.html#_old000002" class="m-dox">Old stuff</a></h4><p>This is not merged.</p></aside><aside class="m-note m-default"><h4><a href="old.html#_old000003" class="m-dox">Old stuff</a></h4><p>With this. Only on the listing page.</p></aside><aside class="m-note m-danger"><h4>Warning</h4><p>Non-text item after a note/whatever should be part of a paragraph:</p></aside><p><em>This is</em> inside a paragraph.</p><aside class="m-note m-default"><h4>Id</h4><p>some strange RCS content</p></aside><aside class="m-note m-default"><h4>Author</h4><p>The Author</p></aside><aside class="m-note m-default"><h4>Authors</h4><p>Another Author, That Intern We Forgot The Name Of</p></aside><aside class="m-note m-default"><h4>Version</h4><p>1.0rc3</p></aside><aside class="m-note m-default"><h4>Since</h4><p>1.0rc1</p></aside><aside class="m-note m-default"><h4>Date</h4><p>2018-02-09</p></aside><aside class="m-note m-success"><h4>Precondition</h4><p>A precondition.</p></aside><aside class="m-note m-success"><h4>Postcondition</h4><p>A postcondition.</p></aside><aside class="m-note m-default"><h4>Copyright</h4><p>This is illegal to use.</p></aside><aside class="m-note m-success"><h4>Invariant</h4><p>Everything is changing all the time.</p></aside><aside class="m-note m-default"><h4>Remark</h4><p>What does a <code>remark</code> mean and how is it different from <code>note</code>, anyway?</p><p>Paragraph that goes to the remark section</p></aside><aside class="m-note m-default"><h4>Paragraph title</h4><p>Paragraph that goes separately</p><p>Paragraph that adds to the previous</p></aside>
+<p>First paragraph containing some content.</p><aside class="m-note m-warning"><h4>Attention</h4><p>An attention section.</p></aside><aside class="m-note m-default"><h4>See also</h4><p>Other section.</p></aside><p>Paragraph following the sections.</p><aside class="m-note m-info"><h4>Note</h4><p>A note.</p></aside><aside class="m-note m-danger"><h4><a href="bug.html#_bug000001" class="m-dox">Bug</a></h4><p>This is a bug.</p></aside><aside class="m-note m-dim"><h4><a href="todo.html#_todo000001" class="m-dox">Todo</a></h4><p>Or a TODO.</p></aside><aside class="m-note m-danger"><h4><a href="deprecated.html#_deprecated000001" class="m-dox">Deprecated</a></h4><p>Which is deprecated.</p></aside><aside class="m-note m-default"><h4><a href="old.html#_old000001" class="m-dox">Old stuff</a></h4><p>This is old.</p></aside><blockquote><p>A blockquote</p></blockquote><p>Text right after that blockquote should be a new paragraph.</p><ul><li>A simple</li><li>List<ol><li>With one line</li><li>for each</li></ol></li><li>item, so paragraphs are removed</li></ul><ul><li>A simple</li><li>List<ol><li>With the sublist delimited</li><li>by blank lines</li></ol></li><li>should behave the same as above</li></ul><ul><li><p>A new list</p><p>of multiple</p><p>paragraphs.</p></li><li><p>Another item</p><ul><li><p>A sub list</p><p>Another paragraph</p></li></ul></li></ul><p>A paragraph after that list.</p><table class="m-table"><thead><tr><th>Table header</th><th>Another</th><th>Third</th></tr></thead><tbody><tr><td>Cell</td><td>Another cell</td><td>3rd</td></tr><tr><td>Next row</td><td></td><td>This</td></tr><tr><td>is a table</td><td><em>really</em></td><td>yes.</td></tr></tbody></table><table class="m-table"><caption>Table <em>caption</em></caption><thead><tr><th>Table</th><th>with</th></tr><tr><th>two</th><th>row</th></tr></thead><tbody><tr><td>table</td><td>header</td></tr></tbody></table><aside class="m-note m-warning"><h4>Attention</h4><p>Attention, first paragraph.</p><p>Attention, second paragraph.</p><p>Attention, third paragraph.</p></aside><aside class="m-note m-info"><h4>Note</h4><p>A note, not merged with the above.</p></aside><aside class="m-note m-default"><h4><a href="old.html#_old000002" class="m-dox">Old stuff</a></h4><p>This is not merged.</p></aside><aside class="m-note m-default"><h4><a href="old.html#_old000003" class="m-dox">Old stuff</a></h4><p>With this. Only on the listing page.</p></aside><aside class="m-note m-danger"><h4>Warning</h4><p>Non-text item after a note/whatever should be part of a paragraph:</p></aside><p><em>This is</em> inside a paragraph.</p><aside class="m-note m-default"><h4>Id</h4><p>some strange RCS content</p></aside><aside class="m-note m-default"><h4>Author</h4><p>The Author</p></aside><aside class="m-note m-default"><h4>Authors</h4><p>Another Author, That Intern We Forgot The Name Of</p></aside><aside class="m-note m-default"><h4>Version</h4><p>1.0rc3</p></aside><aside class="m-note m-default"><h4>Since</h4><p>1.0rc1</p></aside><aside class="m-note m-default"><h4>Date</h4><p>2018-02-09</p></aside><aside class="m-note m-success"><h4>Precondition</h4><p>A precondition.</p></aside><aside class="m-note m-success"><h4>Postcondition</h4><p>A postcondition.</p></aside><aside class="m-note m-default"><h4>Copyright</h4><p>This is illegal to use.</p></aside><aside class="m-note m-success"><h4>Invariant</h4><p>Everything is changing all the time.</p></aside><aside class="m-note m-default"><h4>Remark</h4><p>What does a <code>remark</code> mean and how is it different from <code>note</code>, anyway?</p><p>Paragraph that goes to the remark section</p></aside><aside class="m-note m-default"><h4>Paragraph title</h4><p>Paragraph that goes separately</p><p>Paragraph that adds to the previous</p></aside><aside class="m-note m-default"><h4>Block title</h4><div><p>Hello!</p><p>Here is something inside that paragraph block.</p></div></aside>
</div>
</div>
</div>