tomtom-international / asciidoxy

AsciiDoxy generates API documentation from Doxygen XML output to AsciiDoc.
Apache License 2.0
31 stars 10 forks source link

Support for tables in description parser #11

Closed matkaz closed 4 years ago

matkaz commented 4 years ago

Currently description_parser.py does not handle <table>, <row> and <entry> tags. This causes asciidoxy to incorrectly generate HTML and Markdown tables in the documentation.

For example given Doxygen XML output:

<para><table rows="3" cols="2"><row>
<entry thead="yes"><para>First Header </para>
</entry><entry thead="yes"><para>Second Header  </para>
</entry></row>
<row>
<entry thead="no"><para>Content Cell </para>
</entry><entry thead="no"><para>Content Cell  </para>
</entry></row>
<row>
<entry thead="no"><para>Content Cell </para>
</entry><entry thead="no"><para>Content Cell  </para>
</entry></row>
</table>
</para>

The result is:

<div class="literalblock">
<div class="content">
<pre>First Header</pre>
</div>
</div>
<div class="paragraph">
<p>Second Header</p>
</div>
<div class="literalblock">
<div class="content">
<pre>Content Cell</pre>
</div>
</div>
<div class="paragraph">
<p>Content Cell</p>
</div>
<div class="literalblock">
<div class="content">
<pre>Content Cell</pre>
</div>
</div>
<div class="paragraph">
<p>Content Cell</p>
</div>

The expected output should be like:

<div>
<table>
<tr>
<th>First Header</th>
<th>Second Header</th>
</tr>
<tr>
<td>Content Cell</td>
<td>Content Cell</td>
</tr>
<tr>
<td>Content Cell</td>
<td>Content Cell</td>
</tr>
</table>
</div>
silvester747 commented 4 years ago

Released in version 0.5.5