marked icon indicating copy to clipboard operation
marked copied to clipboard

The vertical bars within backsticks shouldn't be interpreted as table cell delimiter.

Open lzl124631x opened this issue 6 years ago • 2 comments

Describe the bug

|**Meaning**|Main axis|
|---|---|
|**Values**|`row | row-reverse | column | column-reverse`|

is not correctly rendered as table. The vertical bars within backsticks shouldn't be interpreted as table cell delimiter. Related to https://github.com/markedjs/marked/issues/113

StackEdit (among others) supports it.

image

To Reproduce demo

Expected behavior

Meaning Main axis
Values row | row-reverse | column | column-reverse

lzl124631x avatar Nov 09 '18 22:11 lzl124631x

This is a bug but you can fix it by escaping the bars. demo

PRs are welcome 😃

UziTech avatar Nov 10 '18 05:11 UziTech

There's no easy way to fix this with regexes

Feder1co5oave avatar Nov 23 '18 10:11 Feder1co5oave

It seems like marked actually renders this the same as GitHub:

|**Meaning**|Main axis|
|---|---|
|**Values**|`row | row-reverse | column | column-reverse`|
Meaning Main axis
Values `row

marked demo


GitHub requires the pipes to be escaped

|**Meaning**|Main axis|
|---|---|
|**Values**|`row \| row-reverse \| column \| column-reverse`|
Meaning Main axis
Values row | row-reverse | column | column-reverse

marked demo

UziTech avatar Sep 14 '23 22:09 UziTech