remarkjs / remark-gfm

remark plugin to support GFM (autolink literals, footnotes, strikethrough, tables, tasklists)
https://remark.js.org
MIT License
713 stars 24 forks source link

Support for merged cells #66

Closed Startouf closed 2 months ago

Startouf commented 2 months ago

Initial checklist

Problem

Show table with merged cells (like one header row spanning over two cells)

Currently the following syntax does not work

| **Header spanning two columns ||
| - ||
| column 1 | column 2|

Note that Github does not seem to suport this either :

**Header spanning two columns
column 1 column 2

Solution

Support syntaxes allowing t create merged cells

See specs and questions asked on StackOverflow

https://web.archive.org/web/20170905052152/http://fletcher.github.io/MultiMarkdown-5/tables.html https://stackoverflow.com/questions/46621765/can-i-merge-table-rows-in-markdown

Alternatives

Support pandoc style markdown for tables ? https://pandoc.org/chunkedhtml-demo/8.9-tables.html

wooorm commented 2 months ago

Hey! This project is called remark-gfm, not remark-multimarkdown or remark-pandoc, so nope, not going to happen.

I recommend not doing this. Use regular GFM tables. Or, use HTML.

github-actions[bot] commented 2 months ago

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.

Damola18 commented 2 months ago

Hey! This project is called remark-gfm, not remark-multimarkdown or remark-pandoc, so nope, not going to happen.

I recommend not doing this. Use regular GFM tables. Or, use HTML.

So are you at any point considering adding support for row spanning or column spacing in the future. If not, what alternatives do you have in place for tables with merged cells for remark-gfm ?. Tried a handful of things for my current use case but it doesnt seem to work.

ChristianMurphy commented 2 months ago

Hey @Damola18! 👋

Taking a step back, consider not creating another markdown flavor. The reasons and alternatives are explained best here: https://github.com/micromark/micromark?tab=readme-ov-file#extending-markdown

So are you at any point considering adding support for row spanning or column spacing in the future

Not to remark-gfm, no.

If not, what alternatives do you have in place for tables with merged cells for remark-gfm ?.

None in remark-gfm

Tried a handful of things for my current use case but it doesnt seem to work.

It is possible to create your own markdown extension for pandoc or any other flavor you want to support. https://github.com/micromark/micromark?tab=readme-ov-file#creating-a-micromark-extension the process is involved, but possible.