hugo-to-gemini/testdata/tables.gmi
Timur Demin fc76187e13
Implement renderer test suite
This implements a Markdown / Gemtext suite, testing the entire renderer
at complex Markdown documents, containing the entirety of current
Markdown features accessible with gmnhg. The test suite can be expanded
by adding a pair of .md/.gmi files.

Minor bug fixes in JSON/Org metadata parsing where bugs were detected
with the test suite are also included in this patch.

Fixes #13.
2021-09-30 18:01:46 +05:00

52 lines
1 KiB
Text

# Tables
gmnhg uses preformatted text blocks to render ASCII text tables.
## Simple table example
```
+-----------+-------------+
| Syntax | Description |
+-----------+-------------+
| Header | Title |
| Paragraph | Text |
+-----------+-------------+
```
## Empty rows or cells
These are picked up as well.
```
+-------+------+
| test | nice |
+-------+------+
| `est` | |
+-------+------+
```
```
+------+------+
| test | nice |
+------+------+
| | |
+------+------+
```
## Formatting inside tables
Text formatting is fully supported inside tables. Links will also get picked up, and a links block will appear after the parent table if needed.
```
+----------+----------+--------------+
| Header 1 | Header 2 | Header 3[^1] |
+----------+----------+--------------+
| Item 1 | Item 2 | Item 3 |
| Item 1a | Item 2a | Item 3a |
+----------+----------+--------------+
```
[^1]: Example footnote that explains header 3.
=> https://example.tld Header 2
=> https://www.example.com Item 2