chiark / gitweb /
doxygen: implement <hruler/>.
authorVladimír Vondruš <mosra@centrum.cz>
Sat, 19 May 2018 11:23:21 +0000 (13:23 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Sat, 19 May 2018 11:35:27 +0000 (13:35 +0200)
doxygen/dox2html5.py
doxygen/test/contents_autobrief_hr/namespaceNamespace.html
doxygen/test/contents_typography/index.html
doxygen/test/contents_typography/input.dox

index 317e8a9f14a1da751642f2232c370f38de91ca39..05105e4e0360c45b22e4b9735510c7ba64e810ed 100755 (executable)
@@ -546,6 +546,7 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET.
         # Those elements are:
         # - <heading>
         # - <blockquote>
+        # - <hruler>
         # - <simplesect> (if not describing return type) and <xrefsect>
         # - <verbatim>, <preformatted> (those are the same thing!)
         # - <variablelist>, <itemizedlist>, <orderedlist>
@@ -571,7 +572,7 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET.
             end_previous_paragraph = False
 
             # Straightforward elements
-            if i.tag in ['heading', 'blockquote', 'xrefsect', 'variablelist', 'verbatim', 'preformatted', 'itemizedlist', 'orderedlist', 'image', 'table', '{http://mcss.mosra.cz/doxygen/}div']:
+            if i.tag in ['heading', 'blockquote', 'hruler', 'xrefsect', 'variablelist', 'verbatim', '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
@@ -1037,6 +1038,10 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET.
                     out.parsed += '<img class="m-image{}" src="{}" alt="Image" />'.format(
                         ' ' + add_css_class if add_css_class else '', name)
 
+        elif i.tag == 'hruler':
+            assert element.tag == 'para' # is inside a paragraph :/
+            out.parsed += '<hr/>'
+
         # Custom <div> with CSS classes (for making dim notes etc)
         elif i.tag == '{http://mcss.mosra.cz/doxygen/}div':
             has_block_elements = True
index fa1eafe310c28df5d80d1b98700916996866a818..5cc09f2a6453924e3afd166d76c199a6b7c787d6 100644 (file)
@@ -31,7 +31,7 @@
             </li>
           </ul>
         </div>
-<p>SOME HEAVY LICENSE HEADER WITH SOME HEAVY WORDS</p>
+<p>SOME HEAVY LICENSE HEADER WITH SOME HEAVY WORDS</p><hr/>
         <section id="func-members">
           <h2><a href="#func-members">Functions</a></h2>
           <dl class="m-dox">
index 66acc16aac95e2941963615ad832288dde4c6cf2..0a33ca5cd2573712c07c8365d3b66323592d54d3 100644 (file)
@@ -25,7 +25,7 @@
 <section id="section"><h2><a href="#section">Page section</a></h2><blockquote><p>A blockquote.</p></blockquote><pre>Preformatted text.
 </pre><p>Paragraph<br />with<br />explicit<br />line<br />breaks.</p><pre>Differently
   preformatted
-text.</pre><section id="subsection"><h3><a href="#subsection">Page subsection</a></h3><ul><li>Unordered</li><li>list</li><li>of<ul><li>nested</li><li>items</li></ul></li><li>and back</li></ul><section id="subsubsection"><h4><a href="#subsubsection">Sub-sub section</a></h4><ol><li>Ordered</li><li>list</li><li>of<ol><li>nested</li><li>items</li></ol></li><li>and back</li></ol><p><a name="an-anchor"></a> This is a <code>typewriter text</code>, <em>emphasis</em> and <strong>bold</strong>. <em>Emphasis with <code>typewriter</code> and <strong>bold</strong> nested.</em> <a href="http://google.com">http:/<wbr />/<wbr />google.com</a> and <a href="http://google.com">URL</a>. En-dash &ndash; and em-dash &mdash;. Reference to a <a href="index.html#subsection" class="m-dox">Page subsection</a>. Named reference with special characters in title: <a href="warnings.html" class="m-dox">&raquo; Warnings &laquo;</a>. Reference with escaped characters in&nbsp;title: <a href="index.html#an-anchor" class="m-dox">&lt;anchor&gt;</a>.</p><p>Empty elements:</p><pre></pre></section></section></section>
+text.</pre><section id="subsection"><h3><a href="#subsection">Page subsection</a></h3><ul><li>Unordered</li><li>list</li><li>of<ul><li>nested</li><li>items</li></ul></li><li>and back</li></ul><section id="subsubsection"><h4><a href="#subsubsection">Sub-sub section</a></h4><ol><li>Ordered</li><li>list</li><li>of<ol><li>nested</li><li>items</li></ol></li><li>and back</li></ol><p><a name="an-anchor"></a> This is a <code>typewriter text</code>, <em>emphasis</em> and <strong>bold</strong>. <em>Emphasis with <code>typewriter</code> and <strong>bold</strong> nested.</em> <a href="http://google.com">http:/<wbr />/<wbr />google.com</a> and <a href="http://google.com">URL</a>. En-dash &ndash; and em-dash &mdash;. Reference to a <a href="index.html#subsection" class="m-dox">Page subsection</a>. Named reference with special characters in title: <a href="warnings.html" class="m-dox">&raquo; Warnings &laquo;</a>. Reference with escaped characters in&nbsp;title: <a href="index.html#an-anchor" class="m-dox">&lt;anchor&gt;</a>.</p><p>Empty elements:</p><pre></pre><hr/><p>Above is a horizontal line.</p></section></section></section>
       </div>
     </div>
   </div>
index 0d437a89225b389dae138b69cc4a3f40f87dd62f..7e5fdce979f8c2bb70775006b28fbed08d072171 100644 (file)
@@ -41,6 +41,10 @@ in&nbsp;title: @ref an-anchor "<anchor>".
 
 Empty elements: <em></em> <tt></tt> <strong></strong> <pre></pre>
 
+- - -
+
+Above is a horizontal line.
+
 */
 
 /** @page warnings Content that produces warnings