https://github.com/e79180/mdbook-mergecells
Adds cell merging capabilities to mdBook tables.
https://github.com/e79180/mdbook-mergecells
go golang html markdown mdbook mdbook-plugins mdbook-preprocessor
Last synced: 11 months ago
JSON representation
Adds cell merging capabilities to mdBook tables.
- Host: GitHub
- URL: https://github.com/e79180/mdbook-mergecells
- Owner: E79180
- License: apache-2.0
- Created: 2025-06-15T01:44:32.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-06-16T02:01:52.000Z (12 months ago)
- Last Synced: 2025-06-23T11:01:39.504Z (12 months ago)
- Topics: go, golang, html, markdown, mdbook, mdbook-plugins, mdbook-preprocessor
- Language: Go
- Homepage:
- Size: 22.5 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mdbook-mergecells
Adds cell merging capabilities to mdBook tables.
## Installation
1. Properly install the Go programming language. Use the `go version` command to verify it;
1. Execute the command `go install github.com/E79180/mdbook-mergecells` to compile and install the binary locally;
1. Add the line `[preprocessor.mergecells]` to the `book.toml` file in your mdBook project directory.
## How to Use
Add the annotation `@span:$colspan,$rowspan` to cells that need to be merged right or down. For example:
```markdown
A|B|C|D|E
--|--|--|--|--
A|B|C|D|E
A@span:2,2|B|C|D|E
A|B|C|D|E
A|B|C|D|E
```
This will result in: 
> Note: After merging, only the content of the first cell is preserved. This library does not support Markdown syntax within tables; please use HTML tags for formatting requirements.
# mdbook-mergecells
为mdBook提供合并单元格的功能。
## 安装
1. 正确的安装Go编程语言,使用`go version`命令来检查它;
1. 执行命令`go install github.com/E79180/mdbook-mergecells@latest`以编译二进制文件并安装到本地;
1. 在您mdBook项目目录中的`book.toml`文件添加一行`[preprocessor.mergecells]`
## 如何使用
为需要向右或向下合并的单元格添加注解`@span:$colspan,$rowspan`,例如
```markdown
A|B|C|D|E
--|--|--|--|--
A|B|C|D|E
A@span:2,2|B|C|D|E
A|B|C|D|E
A|B|C|D|E
```
结果将会是:
> 注意:合并后只保留第一个单元格中的内容。该库不支持表格内部markdown语法,有格式需求请用html标签。