marktable
Version:
Markdown table parser, editor and formater
114 lines (79 loc) • 1.98 kB
Markdown
> Document test: should find all tables in a document
## SOURCE
### 1. Basic table 1
Header 1 | Header 2
---------|----------
foo | bar
### 2. Basic table 2
| Header 1 | Header 2 |
| ---------|----------|
| foo | bar |
### 3. Multi headers (with colspan)
| MAIN HEADER ||
| Header 1 | Header 2 |
|----------|----------|
| foo | bar |
| One cell ||
### 4. Alignements
| Default | Left | Center | Right |
|---------|:-----|:------:|------:|
| o | o | o | o |
### 5. Multiline cells
| Header 1 |
|----------|
| Multi |
| line 1 |
| -------- |
| Multi |
| line 2 |
| -------- |
### 6. Multi-tbody (empty line and dot syntax)
| Header 1 |
|----------|
| Foo |
| Bar |
| Quz |
| Baz |
............
| Flux |
| Doo |
### 7. Two tables
| Table 1/2|
|----------|
| Foo |
| Bar |
| Table 2/2|
|----------|
| Baz |
### 8. Missing chars
| Header 1 | Header 2
| - |
| foo | bar
### 9. Caption and ID
[My table][tableID]
| Header 1 | Header 2 |
| ---------|----------|
| foo | bar |
### 10. No headers
|----------|----------|
| foo | bar |
### 111. Full table
[A table with many of the marktable functionalities][tableID]
| | | HEADER ||
| | Header 1 | Header 2 | Header 3 |
|---|----------|:--------:|---------:|
| 1 | foo | center | right |
| 2 | One cell || |
......................................
| 3 | A multiline row |||
| | because it is easier to put |||
| | in its own tbody |||
|---|------------------------------|||
| 4 | This |||
| | is |||
| | a multiline row too |||
|---|------------------------------|||
| 5 | This is not a multiline row |||
| 6 | Anyway ... This is still |||
| 7 | the | same | table |||
| 8 | Escape pipe `foo \| grep` |||