greghendershott / markdown

Markdown parser written in Racket.
100 stars 28 forks source link

Add markdown tables support #72

Open ZelphirKaltstahl opened 6 years ago

ZelphirKaltstahl commented 6 years ago

I am not sure how much work this involves, but I feel it would be great to have markdown table support. It is possible to work around by writing tables in HTML inside the markdown file.

For example:

| id | category | item |
|:---|:--------:|-----:|
|asas| asas     | asas |
|asas| asas     | asas |
|asas| asas     | asas |
|asas| asas     | asas |
|asas| asas     | asas |

Is not recognized and the workaround is to write HTML tables:

<table>
    <thead>
        <tr>
            <td class="left">left</td>
            <td class="center">center</td>
            <td class="right">right</td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>a</td>
            <td>b</td>
            <td>c</td>
        </tr>
        <tr>
            <td>d</td>
            <td>e</td>
            <td>f</td>
        </tr>
    </tbody>
</table>

Other table syntaxes are also thinkable, like grid tables from ReST or Emacs Org mode tables, although I think standard markdown table syntax should have priority.

greghendershott commented 6 years ago

This is a copy-and-paste of https://github.com/greghendershott/frog/issues/217#issuecomment-388999185:

pmatos commented 5 years ago

I happened to be looking for this feature as well...

alex-hhh commented 5 years ago

Hi @pmatos , I have been using this pull request: https://github.com/greghendershott/markdown/pull/56 without any problems in my blog.

pmatos commented 5 years ago

@alex-hhh thanks - I will probably will be forking this repo to keep in sync with features I want to add for darwin.

pmatos commented 5 years ago

@alex-hhh https://github.com/pmatos/markdown-ng