The option "Enable multimarkdown table extension" should come checked by default

I successfully migrated from Evernote to Joplin, and I almost dismissed Joplin entirely because my headerless tables were broken, but that option fixed everything. A less persistent user would have just walked away.

Is there a good reason for that option to be turned off by default?

Could you provide an example of enex file that contains one of these tables?

attached the Enex file.
table import problem.enex (1.3 KB)

I did some testing, and I think the main problem is that the first row have a merged column, so it appears that I lost the entire 2nd column

with the "Enable multimarkdown table extension" the 2nd column was there:

Not a solution but trying to help determine the problem by testing a few things.

Joplin looks to be displaying the markdown correctly but the markdown is wrong.

The table is not proper markdown for a two column table, just one column. Without multimarkdown tables enabled the rendering appears to be more strict and one column is all you get.

With multimarkdown tables switched on it is still wrong because the rendered header row is not complete (one column) and it seems that multimarkdown has just appended a cell to the second row to render something closer to the original than plain markdown can. The first row is not merged (it's a one column table).

The HTML for the table in the ENEX file looks like this (when reformatted a bit).

<table width="705px" style="border-collapse:collapse;width:705px;">
  <colgroup>
    <col style="width: 328px;" />
    <col style="width: 377px;" />
  </colgroup>
  <tbody>
    <tr>
      <td colspan="2" style="border-color:#ccc;border-width:1px;border-style:solid;padding:10px;"><div>First row is a 2 wide cell merged</div></td>
    </tr>
    <tr>
      <td style="border-color:#ccc;border-width:1px;border-style:solid;padding:10px;"><div>first column of the second row</div></td>
      <td style="border-color:#ccc;border-width:1px;border-style:solid;padding:10px;"><div>second column of the second row</div></td>
    </tr>
  </tbody>
</table>

Points to note:

  • The table has no header row (<tr><th> as opposed to <tr><td>).
  • <colgroup> & <col> appear to be used by EN to allow table styling that markdown does not support, just like the <td> styles. These do however define that there are two columns.
  • The HTML for the first actual data row (<tr><td>) only gives data for a single set of "cell" tags (<td> ... </td>) as it uses colspan to indicate that the data spans the two columns defined in the colgroup.

It looks like the importer is getting fouled as it seems that the colgroup / colspan data is not being taken into consideration. Without a header row for guidance and with the very first actual row being apparently only one cell wide, it has made a table that is one cell (column) wide.

I tested this by creating a new ENEX file but I moved row 2 to row 1 and vice versa.

In that case the importer used the (new) first row to determine that there were two columns and created the markdown accordingly. It was still wrong as it did not mark that the (new) second row comprised two merged cells (colspan) and it displayed an empty header row that the original did not have.

Only the multimarkdown tables extension allows headerless tables but these have a different format that would not work in any Joplin client without the extension enabled.

So unless the importer behaves differently depending on how Joplin is configured I guess that will always be a problem.

As to whether the importer can be made to (or already should) interpret <colgroup> and / or <colspan> information to help determine a table's overall format is something I cannot answer (hence no solution!)

(If the above observations turn out to be complete rubbish, please be kind and I will delete the post in shame!)

1 Like