Table syntax plugin for markdown-it markdown parser
npm install markdown-it-table-merge-cells  
markdown-it 增强辅助类表格语法插件(目前只支持列合并和行合并。后面会考虑加入行列合并。)
markdown-it-multimd-table不支持配合prettier格式化一起使用,可读性和可维护性就比较差,因此我自己写一个。
markdown-it作为解析器的markdown编辑器,只要该编辑器支持配置即可使用此插件扩展表格语法。
markdown-it enhanced auxiliary class table syntax plug-in (Currently, only column merging and row merging are supported. Will consider joining the column merge later.)
markdown-it-multimd-table is not supported with prettier formatting, making it less readable and maintainable, so I wrote my own.
markdown editor that uses markdown-it as the parser can use this plugin to extend the table syntax as long as the editor supports configuration.
js
npm i markdown-it -D
npm i markdown-it-table-merge-cells -D
// 以上两行效果同下行/The above two lines have the same downward effect
npm i markdown-it markdown-it-table-merge-cells -D
import MarkdownIt from "markdown-it";
import TableMergeCells from "markdown-it-table-merge-cells";
const md = new MarkdownIt()
md.use(TableMergeCells);
console.log(
md.render(
)
);
``
| 4col | |||
|---|---|---|---|
| 2row | content | 3row | content |
| content | content | ||
| content | content | content | |