micromark / common-markup-state-machine

CMSM: Common markup state machine
49 stars 0 forks source link

GFM extension: tables #8

Closed wooorm closed 3 years ago

wooorm commented 5 years ago

GFM tables are pretty straightforward:

| foo | bar |
| --- | --- |
| baz | bim |
foo bar
baz bim

But there are some caveats.

Exhibit A (no pipes):

abc
:-

abc :-

Also a table 🤷‍♂️

Exhibit B (escaping in inline code):

| f\|oo  |
| ------ |
| b `\|` az |
| b **\|** im |
f\ oo
b \| az
b | im

Escapes cannot be used in CM inline code, or in GFM inline code, but they can apparently be used in inline code in table cells in GFM 🤷‍♂️

wooorm commented 3 years ago

https://github.com/micromark/micromark-extension-gfm-table