123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379 |
- >>> basic table
- head | cells
- -----|------
- body | cells
- <<<
- <table>
- <thead>
- <tr>
- <th>head</th>
- <th>cells</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>body</td>
- <td>cells</td>
- </tr>
- </tbody>
- </table>
- >>> multiple rows
- head | cells
- -----|------
- body | cells
- more | cells
- <<<
- <table>
- <thead>
- <tr>
- <th>head</th>
- <th>cells</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>body</td>
- <td>cells</td>
- </tr>
- <tr>
- <td>more</td>
- <td>cells</td>
- </tr>
- </tbody>
- </table>
- >>> rows wrapped in pipes
- | head | cells |
- |------|-------|
- | body | cells |
- <<<
- <table>
- <thead>
- <tr>
- <th>head</th>
- <th>cells</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>body</td>
- <td>cells</td>
- </tr>
- </tbody>
- </table>
- >>> rows wrapped in pipes, whitespace alignment row
- | head | cells |
- | -- | --- |
- | body | cells |
- <<<
- <table>
- <thead>
- <tr>
- <th>head</th>
- <th>cells</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>body</td>
- <td>cells</td>
- </tr>
- </tbody>
- </table>
- >>> rows wrapped in pipes, tabs in whitespace
- | head | cells |
- | -- | --- |
- | body | cells |
- <<<
- <table>
- <thead>
- <tr>
- <th>head</th>
- <th>cells</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>body</td>
- <td>cells</td>
- </tr>
- </tbody>
- </table>
- >>> cells with inline syntax
- head `code` | _cells_
- ------------|--------
- *text* | <span>text</span>
- <<<
- <table>
- <thead>
- <tr>
- <th>head <code>code</code></th>
- <th><em>cells</em></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><em>text</em></td>
- <td><span>text</span></td>
- </tr>
- </tbody>
- </table>
- >>> cells are parsed before inline syntax
- header | _foo | bar_
- -------|------------|---
- text | text
- <<<
- <table>
- <thead>
- <tr>
- <th>header</th>
- <th>_foo</th>
- <th>bar_</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>text</td>
- <td>text</td>
- <td></td>
- </tr>
- </tbody>
- </table>
- >>> cells contain reference links
- header | header
- -------|--------
- text | [link][here]
- [here]: http://url
- <<<
- <table>
- <thead>
- <tr>
- <th>header</th>
- <th>header</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>text</td>
- <td><a href="http://url">link</a></td>
- </tr>
- </tbody>
- </table>
- >>> one column tables
- head
- -----|
- body
- <<<
- <table>
- <thead>
- <tr>
- <th>head</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>body</td>
- </tr>
- </tbody>
- </table>
- >>> varying cells per row
- head | foo | bar
- -----|-----|-----
- body
- row with | two cells
- <<<
- <table>
- <thead>
- <tr>
- <th>head</th>
- <th>foo</th>
- <th>bar</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>body</td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>row with</td>
- <td>two cells</td>
- <td></td>
- </tr>
- </tbody>
- </table>
- >>> left, center, and right alignment
- head | cells | here
- :----|:-----:|----:
- body | cells | here
- too | many | cells | here
- <<<
- <table>
- <thead>
- <tr>
- <th align="left">head</th>
- <th align="center">cells</th>
- <th align="right">here</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td align="left">body</td>
- <td align="center">cells</td>
- <td align="right">here</td>
- </tr>
- <tr>
- <td align="left">too</td>
- <td align="center">many</td>
- <td align="right">cells</td>
- </tr>
- </tbody>
- </table>
- >>> left, center, and right alignment, with whitespace
- head | cells | here
- :-- | :---: | ---:
- body | cells | here
- too | many | cells | here
- <<<
- <table>
- <thead>
- <tr>
- <th align="left">head</th>
- <th align="center">cells</th>
- <th align="right">here</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td align="left">body</td>
- <td align="center">cells</td>
- <td align="right">here</td>
- </tr>
- <tr>
- <td align="left">too</td>
- <td align="center">many</td>
- <td align="right">cells</td>
- </tr>
- </tbody>
- </table>
- >>> escape pipe
- | Name | Character |
- | --- | --- |
- | Backtick | ` |
- | Pipe | \| |
- <<<
- <table>
- <thead>
- <tr>
- <th>Name</th>
- <th>Character</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>Backtick</td>
- <td>`</td>
- </tr>
- <tr>
- <td>Pipe</td>
- <td>|</td>
- </tr>
- </tbody>
- </table>
- >>> escape pipe, preserve trailing whitespace
- | Name | Character |
- | --- | --- |
- | Pipe | \| abcdef |
- <<<
- <table>
- <thead>
- <tr>
- <th>Name</th>
- <th>Character</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>Pipe</td>
- <td>| abcdef</td>
- </tr>
- </tbody>
- </table>
- >>> trailing whitespace after final pipe
- | Name | Character |
- | --- | --- |
- | Pipe | abcdef |
- <<<
- <table>
- <thead>
- <tr>
- <th>Name</th>
- <th>Character</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>Pipe</td>
- <td>abcdef</td>
- </tr>
- </tbody>
- </table>
- >>> issue #531
- | A | [B](url) | C |
- |---|---|
- | a | b | c |
- <<<
- <p>| A | <a href="url">B</a> | C |
- |---|---|
- | a | b | c |</p>
- >>> trailing whitespace after delimiter row
- | Name | Value |
- | --- | --- |
- | Foo | bar |
- <<<
- <table>
- <thead>
- <tr>
- <th>Name</th>
- <th>Value</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>Foo</td>
- <td>bar</td>
- </tr>
- </tbody>
- </table>
- >>> can interrupt a paragraph
- paragraph
- foo | bar
- --- | ---
- baz | bim
- <<<
- <p>paragraph</p>
- <table>
- <thead>
- <tr>
- <th>foo</th>
- <th>bar</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>baz</td>
- <td>bim</td>
- </tr>
- </tbody>
- </table>
|