adam-p / markdown-here

Google Chrome, Firefox, and Thunderbird extension that lets you write email in Markdown and render it before sending.
http://markdown-here.com
MIT License
59.64k stars 11.28k forks source link

Add spanned columns in tables #176

Open nkalvi opened 10 years ago

nkalvi commented 10 years ago

Please add support for spanned column in tables - as implemented in some other MD variants.

adam-p commented 10 years ago

Can you provide pointers toward the spanning syntax used in other MD variants?

Unsatisfying workaround: You can use raw HTML, like so:

<table>
    <tr>
        <th>Col 1</th>
        <th>Col 2</th>
        <th>Col 3</th>
    </tr>
    <tr>
        <td colspan="2">span 2 cols</td>
        <td rowspan="2">span 2 rows</td>
    </tr>
    <tr>
        <td>stuff</td>
        <td>stuff</td>
    </tr>
</table>​

Except that because of #157 it won't actually render very nicely -- it'll work a lot better if you put all the HTML on a single line.

search keywords: colspan rowspan

adam-p commented 9 years ago

A follow-up to this...

It seems that MultiMarkdown does have colspan syntax, but not rowspan.

Probably the best way to do rowspan and colspan right now is to use this online HTML table generator to create your table, and then paste it into your email (or whatever) and use MDH to render it. Make sure to check the boxes for "Do not generate CSS" (because MDH provides the CSS) and "Compact mode" (to avoid the multi-line HTML problem I mentioned above).

(I'm also going to add that to the Tips & Tricks wiki page.)

sixtyfive commented 7 years ago

Hi @adam-p! Do you think it would be feasible to implement rowspan in a Markdown parser at all?

CTimmerman commented 6 years ago

I like Textile's syntax for spans:

A backslash \ is used for a column span.

|\2. spans two cols | | col 1 | col 2 |

A forward slash / is used for a row span.

|/3. spans 3 rows | row a | | row b | | row c |

voronin-de commented 2 years ago

Uhm.. so no rowspan or colspan unless we write HTML? :/

sixtyfive commented 2 years ago

that link is dead btw, @CTimmerman

CTimmerman commented 2 years ago

that link is dead btw, @CTimmerman

Then use inline HTML instead. https://stackoverflow.com/a/35485694/819417

sixtyfive commented 2 years ago

that was easy to misunderstand, apologies. i meant that the link to Textile's docs that you posted above ("https://txstyle.org/doc/15/tables") is dead. it should be https://textile-lang.com/doc/tables instead.

CTimmerman commented 2 years ago

that was easy to misunderstand, apologies. i meant that the link to Textile's docs that you posted above ("https://txstyle.org/doc/15/tables") is dead. it should be https://textile-lang.com/doc/tables instead.

Thanks. I couldn't find the new link due to https://pypi.org/project/TxtStyle/ which is probably why they renamed it.