| col1 | col2 | col3 |
|---|--|--|
| long text | `` | text |
{
"type": "tableRow",
"children": [
{
"type": "tableCell",
"children": [
{
"type": "text",
"value": "long text"
}
]
},
{
"type": "tableCell",
"children": [
{
"type": "inlineCode",
"value": ""
}
]
},
{
"type": "tableCell",
"children": [
{
"type": "text",
"value": "text"
}
]
}
]
}
{
"type": "tableRow",
"children": [
{
"type": "tableCell",
"children": [
{
"type": "text",
"value": "long text"
}
]
},
{
"type": "tableCell",
"children": [
{
"type": "inlineCode",
"value": ""
},
{
"type": "text",
"value": " | text"
}
]
}
]
}
GitHub renders it like this:
| col1 | col2 | col3 |
|---|--|--|
| long text | `` | text |
Which is super weird 🤔
Uhm, I think I get why GitHub is “weird”. Because there’s no good solution. Your expected behaviour is not going to work. I don’t like how GH does it, but we can change remark’s actual behaviour.
Take this example:
| 1 | 2 | 3 |
|-|-|-|
| a | `` | text |
| b | `` | `` |
| c | ` | ` |
| d | `|` |
| e | `\|` |
| f | \| |
| 1 | 2 | 3 |
|-|-|-|
| a | | text |
| b | | `|
| c | | |
| d |||
| e ||` |
| f | | |
|) inside inline code, in a table, the vertical bar always creates a new cell (except when escaped with a backslash, such as in row e and f)Not really sure! 🤷♂️ This issue “Table cell mis-parsing caused by empty inlineCode” is an issue with GFM. Also with remark, because we don’t support it either. And we support it differently. We can match GH but it’s not going to solve this issue 🤔
Most helpful comment
GitHub renders it like this:
| col1 | col2 | col3 |
|---|--|--|
| long text | `` | text |
Which is super weird 🤔