markdown icon indicating copy to clipboard operation
markdown copied to clipboard

Add markdown tables support

Open ZelphirKaltstahl opened this issue 8 years ago • 5 comments

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.

ZelphirKaltstahl avatar Jan 01 '18 22:01 ZelphirKaltstahl

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

  • In the context of Frog: My personal opinion is that if I need a table, I'd rather not write it in HTML or markdown. Instead I'd say, "this blog post would be a good one to write in Scribble format so I can write some Racket code to make the table."

  • In the context of the markdown library as its own thing: It's a valid feature request. I guess I'm just reluctant to expand the scope. Writing a markdown parser turned out to be waaaaay more work than I imagined. These days I'm just happy there are no glaring bugs or performance issues. I'd rather not "poke the jello".

greghendershott avatar May 14 '18 23:05 greghendershott

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

pmatos avatar Mar 01 '19 08:03 pmatos

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

alex-hhh avatar Oct 22 '19 00:10 alex-hhh

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

pmatos avatar Oct 23 '19 18:10 pmatos

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

pmatos avatar Oct 23 '19 20:10 pmatos