--- title: Extensions test author: Yuki Izumi version: 0.1 date: '2016-08-31' license: '[CC-BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)' ... ## Tables Here's a well-formed table, doing everything it should. ```````````````````````````````` example | abc | def | | --- | --- | | ghi | jkl | | mno | pqr | .
abc def
ghi jkl
mno pqr
```````````````````````````````` We're going to mix up the table now; we'll demonstrate that inline formatting works fine, but block elements don't. You can also have empty cells, and the textual alignment of the columns is shown to be irrelevant. ```````````````````````````````` example Hello! | _abc_ | セン | | ----- | ---- | | 1. Block elements inside cells don't work. | | | But _**inline elements do**_. | x | Hi! .

Hello!

abc セン
1. Block elements inside cells don't work.
But inline elements do. x

Hi!

```````````````````````````````` Here we demonstrate some edge cases about what is and isn't a table. ```````````````````````````````` example | Not enough table | to be considered table | | Not enough table | to be considered table | | Not enough table | to be considered table | | Just enough table | to be considered table | | ----------------- | ---------------------- | | ---- | --- | |x| |-| | xyz | | --- | .

| Not enough table | to be considered table |

| Not enough table | to be considered table | | Not enough table | to be considered table |

Just enough table to be considered table

| ---- | --- |

x
xyz
```````````````````````````````` A "simpler" table, GFM style: ```````````````````````````````` example abc | def --- | --- xyz | ghi .
abc def
xyz ghi
```````````````````````````````` We are making the parser slighly more lax here. Here is a table with spaces at the end: ```````````````````````````````` example Hello! | _abc_ | セン | | ----- | ---- | | this row has a space at the end | | | But _**inline elements do**_. | x | Hi! .

Hello!

abc セン
this row has a space at the end
But inline elements do. x

Hi!

```````````````````````````````` Table alignment: ```````````````````````````````` example aaa | bbb | ccc | ddd | eee :-- | --- | :-: | --- | --: fff | ggg | hhh | iii | jjj .
aaa bbb ccc ddd eee
fff ggg hhh iii jjj
```````````````````````````````` ### Table cell count mismatches The header and marker row must match. ```````````````````````````````` example | a | b | c | | --- | --- | | this | isn't | okay | .

| a | b | c | | --- | --- | | this | isn't | okay |

```````````````````````````````` But any of the body rows can be shorter. Rows longer than the header are truncated. ```````````````````````````````` example | a | b | c | | --- | --- | --- | x | a | b | 1 | 2 | 3 | 4 | 5 | .
a b c
x
a b
1 2 3
```````````````````````````````` ### Embedded pipes Tables with embedded pipes could be tricky. ```````````````````````````````` example | a | b | | --- | --- | | Escaped pipes are \|okay\|. | Like \| this. | | Within `\|code\| is okay` too. | | _**`c\|`**_ \| complex | don't **\_reparse\_** .
a b
Escaped pipes are |okay|. Like | this.
Within |code| is okay too.
c| | complex
don't _reparse_
```````````````````````````````` ### Oddly-formatted markers This shouldn't assert. ```````````````````````````````` example | a | --- | .
a
```````````````````````````````` ### Escaping ```````````````````````````````` example | a | b | | --- | --- | | \\ | `\\` | | \\\\ | `\\\\` | | \_ | `\_` | | \| | `\|` | | \a | `\a` | \\ `\\` \\\\ `\\\\` \_ `\_` \| `\|` \a `\a` .
a b
\ \\
\\ \\\\
_ \_
| |
\a \a

\ \\

\\ \\\\

_ \_

| \|

\a \a

```````````````````````````````` ### Embedded HTML ```````````````````````````````` example | a | | --- | | hello | | ok
sure | .
a
hello
ok
sure
```````````````````````````````` ### Reference-style links ```````````````````````````````` example Here's a link to [Freedom Planet 2][]. | Here's a link to [Freedom Planet 2][] in a table header. | | --- | | Here's a link to [Freedom Planet 2][] in a table row. | [Freedom Planet 2]: http://www.freedomplanet2.com/ .

Here's a link to Freedom Planet 2.

Here's a link to Freedom Planet 2 in a table header.
Here's a link to Freedom Planet 2 in a table row.
```````````````````````````````` ### Sequential cells ```````````````````````````````` example | a | b | c | | --- | --- | --- | | d || e | .
a b c
d e
```````````````````````````````` ### Interaction with emphasis ```````````````````````````````` example | a | b | | --- | --- | |***(a)***| .
a b
(a)
```````````````````````````````` ## Strikethroughs A well-formed strikethrough. ```````````````````````````````` example A proper ~strikethrough~. .

A proper strikethrough.

```````````````````````````````` Some strikethrough edge cases. ```````````````````````````````` example These are ~not strikethroughs. No, they are not~ This ~is ~ legit~ isn't ~ legit. This is just ~~~~~one~~~~~ huge strikethrough. .

These are ~not strikethroughs.

No, they are not~

This is ~ legit isn't ~ legit.

This is just one huge strikethrough.

```````````````````````````````` ## Autolinks ```````````````````````````````` example : http://google.com https://google.com http://google.com/å scyther@pokemon.com www.github.com www.github.com/á www.google.com/a_b **Autolink and http://inlines** ![http://inline.com/image](http://inline.com/image) a.w@b.c Full stop outside parens shouldn't be included http://google.com/ok. (Full stop inside parens shouldn't be included http://google.com/ok.) "http://google.com" 'http://google.com' http://🍄.ga/ http://x🍄.ga/ .

: http://google.com https://google.com

http://google.com/å http://google.com/å

scyther@pokemon.com

www.github.com www.github.com/á

www.google.com/a_b

Autolink and http://inlines

http://inline.com/image

a.w@b.c

Full stop outside parens shouldn't be included http://google.com/ok.

(Full stop inside parens shouldn't be included http://google.com/ok.)

"http://google.com"

'http://google.com'

http://🍄.ga/ http://x🍄.ga/

```````````````````````````````` ```````````````````````````````` example This shouldn't crash everything: (_A_@_.A . ```````````````````````````````` ## HTML tag filter ```````````````````````````````` example This is not okay, but **this** <strong>is</strong>. <p>This is <xmp> not okay, but **this** <strong>is</strong>.</p> Nope, I won't have <textarea>. <p>No <textarea> here either.</p> <p>This <random /> <thing> is okay</thing> though.</p> Yep, <totally>okay</totally>. <!-- HTML comments are okay, though. --> <!- But we're strict. -> <! No nonsense. > <!-- Leave multiline comments the heck alone, though, okay? Even with {"x":"y"} or 1 > 2 or whatever. Even **markdown**. --> <!--- Support everything CommonMark's parser does. --> <!----> <!--thistoo--> . <p>This is &lt;xmp> not okay, but <strong>this</strong> <strong>is</strong>.</p> <p>This is &lt;xmp> not okay, but **this** <strong>is</strong>.</p> <p>Nope, I won't have &lt;textarea>.</p> <p>No &lt;textarea> here either.</p> <p>This <random /> <thing> is okay</thing> though.</p> <p>Yep, <totally>okay</totally>.</p> <!-- HTML comments are okay, though. --> <p>&lt;!- But we're strict. -&gt; &lt;! No nonsense. &gt;</p> <!-- Leave multiline comments the heck alone, though, okay? Even with {"x":"y"} or 1 > 2 or whatever. Even **markdown**. --> <!--- Support everything CommonMark's parser does. --> <!----> <!--thistoo--> ```````````````````````````````` ## Interop Autolink and strikethrough. ```````````````````````````````` example ~~www.google.com~~ ~~http://google.com~~ . <p><del><a href="http://www.google.com">www.google.com</a></del></p> <p><del><a href="http://google.com">http://google.com</a></del></p> ```````````````````````````````` Autolink and tables. ```````````````````````````````` example | a | b | | --- | --- | | https://github.com www.github.com | http://pokemon.com | . <table> <thead> <tr> <th>a</th> <th>b</th> </tr> </thead> <tbody> <tr> <td><a href="https://github.com">https://github.com</a> <a href="http://www.github.com">www.github.com</a></td> <td><a href="http://pokemon.com">http://pokemon.com</a></td> </tr></tbody></table> ````````````````````````````````