Search code examples
eclipsemarkdown

Eclipse Markdown Tables not rendering


I have tried four different Markdown editors for Eclipse right now, but none of them is able to render tables in the preview; they are always flat.

A simple table like

|hans|pans|
|:---|:---|
|1   |2   |

renders like

|hans|pans| |:---|:---| |1 |2 |

I know that the syntax is correct, since it renders fine in any other markdown tool outside eclipse. FluentMark even offers a table editor, which also works fine.

Since I did not find anything useful by searching the internet, I came to the conclusion that the problem might be connected to my local installation.

And since all plugins I tried have the same problem, it might be some common library which is used by all the plugins.

I'm using Centos 7 and Eclipse 2019-09 R (4.13.0). But I have seen the same behavior on many other Linux/Eclipse installations.

Any hint that might help me solve this problem is appreciated.


Solution

  • According to the Markdown specification, the correct table syntax via the so-called HTML blocks is as follows:

    <table>
      <tr><th>hans</th><th>pans</th></tr>
      <tr><td>1</td><td>2</td></tr>
    </table>
    

    The Eclipse Markdown editor which is part of WikiText renders this syntax correctly.

    In contrast, the table syntax you are talking about is a widely used Markdown extension (e.g. supported by GitHub, Bitbucket, etc.), but not supported by the Eclipse WikiText Markdown editor yet, maybe because it is not part of the core Markdown specification (see the source code and for comparison, the WikiText AsciiDoc editor that supports tables).