Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GFM tables: escaped escapes are incorrectly treated as escapes #277

Open
wooorm opened this issue Aug 31, 2022 · 0 comments
Open

GFM tables: escaped escapes are incorrectly treated as escapes #277

wooorm opened this issue Aug 31, 2022 · 0 comments

Comments

@wooorm
Copy link

wooorm commented Aug 31, 2022

Take this example:

| Head          |
| ------------- |
| A | Alpha     |
| B \| Bravo    |
| C \\| Charlie |
| D \\\| Delta  |
| E \\\\| Echo  |

Yields:

Head
A
B | Bravo
C | Charlie
D \| Delta
E \| Echo

To explain, this is a table with one column (because the header row / delimiter row each have one cell).
That means that “Alpha” disappears: body rows with superfluous columns, drop those columns.
It also makes sense that “Bravo” (and “Delta) show: the pipes are escaped, so they both are part of the one cell in their row.

However, this issue is about the cases of “Charlie” (and “Echo”). They appear, but should disappear like “Alpha”. The backslashes are themselves escaped: they should not escape the pipe.

Taking a different example from markdown:

*a*

\*b*

\\*c*

a

*b*

\c

…both a and c are emphasised, the escape only “works” for b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant