I am using tables in Capella descriptions and found out that M2Doc fails at handling properly merged cells.
Here is an example of what I have in a Capella description:
<table border="1" bordercolor="#000000" cellpadding="2" cellspacing="1" dir="LTR" width="172">
<tbody>
<tr>
<td colspan="1" height="19" rowspan="2" width="50%">
<p align="CENTER">test</p>
</td>
<td height="19" width="50%">
<p align="LEFT"><font face="Calibri" size="3"><font face="Calibri" size="3">c</font></font></p>
</td>
</tr>
<tr>
<td height="19" width="50%">
<p align="LEFT"><font face="Calibri" size="3"><font face="Calibri" size="3">d</font></font></p>
</td>
</tr>
<tr>
<td height="19" width="50%">
<p align="LEFT"><font face="Calibri" size="3"><font face="Calibri" size="3">a</font></font></p>
</td>
<td height="19" width="50%">
<p align="LEFT"><font face="Calibri" size="3"><font face="Calibri" size="3">e</font></font></p>
</td>
</tr>
<tr>
<td height="19" width="50%">
<p align="LEFT"><font face="Calibri" size="3"><font face="Calibri" size="3">b</font></font></p>
</td>
<td height="19" width="50%">
<p align="LEFT"><font face="Calibri" size="3"><font face="Calibri" size="3">f</font></font></p>
</td>
</tr>
</tbody>
The result in Word is the following:
Is that a known bug? I have used an online editor (link towards XHTML tool) to check the validity of the Capella XHTML code and it is valid. Therefore, I have the feeling it is the conversion to Word that is faulty.
Thank you very much,
Stephane
Merged cells are supported by M2Doc: https://github.com/ObeoNetwork/M2Doc/blob/4cb5e1a2d852f1ec0e678906ae3bbcee791fa418/plugins/org.obeonetwork.m2doc/src/org/obeonetwork/m2doc/element/MTable.java#L169
But it is not used by the HTML service. I opened the following issue: https://github.com/ObeoNetwork/M2Doc/issues/460