Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for merge cells in tables #373

Open
josecastillolema opened this issue May 5, 2024 · 5 comments
Open

Support for merge cells in tables #373

josecastillolema opened this issue May 5, 2024 · 5 comments
Labels
better-for-plugin It should be better as Marpit plugin

Comments

@josecastillolema
Copy link

First of all, thanks for the amazing tool!

I was wondering if there is a way to merge cells in a table.

If there is not, I personally found doxygen format very straighforward:

| Cell1| Cell2 | Cell3 |
|------|-------|-------|
| merge right ||       |
| merge|       |       |
| below|^      |^      |
| merge both  || value1|
|^            || value2|
@yhatt yhatt added the better-for-plugin It should be better as Marpit plugin label May 5, 2024
@yhatt
Copy link
Member

yhatt commented May 5, 2024

That syntax is not defined in the specifications for GFM (GitHub Flavored Markdown). There are only a few Markdown flavors that adopt that syntax, and if Marp adopts that, it could negatively impact interoperability with other Markdown processors. Therefore, this feature should be provided as a third-party plugin (e.g. markdown-it-multimd-table)

import { Marp } from '@marp-team/marp-core';
import markdownItMultimdTable from 'markdown-it-multimd-table';

const marp = new Marp().use(markdownItMultimdTable);

marp.render(/* ... */);

@josecastillolema
Copy link
Author

Thanks for the quick response.

Where do these imports should be placed? In the markdown file?

@yhatt
Copy link
Member

yhatt commented May 6, 2024

See the usage section of this repository. Marp Core is a JavaScript library so the plugin also should import in JavaScript.

Or are you using Marp Core indirectly, through other tools such as Marp CLI?

@josecastillolema
Copy link
Author

Yeah, I am using Marp Core through the VSCode extension. In this scenario, where should I place this setup?

Thanks!

@yhatt
Copy link
Member

yhatt commented May 11, 2024

VS Code does not support any plugins due to security reasons. Check out marp-team/marp-vscode#135 (comment).

Whenever using plugins, you have to use Marp CLI instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better-for-plugin It should be better as Marpit plugin
Projects
None yet
Development

No branches or pull requests

2 participants