-
-
Notifications
You must be signed in to change notification settings - Fork 375
Description
Subject of the issue
When using inline code in a table cell, it's necessary to backslash-escape pipe characters. On Github, the backslashes are removed before parsing the table cell contents, so that they aren't included in the output. Remark doesn't do this, so there is no way to put a pipe character inside inline code in a table cell without at least one spurious backslash being passed through to the output.
(Note that this is not the same issue as #465, which is about what happens if you don't escape the pipe character.)
Your environment
- OS: https://codesandbox.io/s/remark-debug-forked-fvxw4
- Packages: remark-parse (9 or 13), remark-gfm 1.0
- Env: Chrome, codesandbox.io
Steps to reproduce
Process this markdown with the remark-gfm extension:
| Ways of Reading Stdout | Linux | OS X (bash 3.2) | Windows |
| ------------------------------ | --------: | --------------: | -------: |
| `[[ ${spork-} ]] \|\| spork ...` | 40433/s | 33840/s | 17667/s |
| Total Performance Improvement | 34.1x | 24.7x | 271.8x |Expected behavior
The markdown should be parsed as on Github, dropping the backslashes from the inline code, i.e:
| Ways of Reading Stdout | Linux | OS X (bash 3.2) | Windows |
|---|---|---|---|
[[ ${spork-} ]] || spork ... |
40433/s | 33840/s | 17667/s |
| Total Performance Improvement | 34.1x | 24.7x | 271.8x |
Actual behavior
When parsed with remark 9, neither backslash is removed. When parsed with remark 13, the second and all subsequent backslashed pipe characters in the cell are correctly removed, but the first backslash is passed through unchanged.