I must use the pipe (|
) symbol in a table cell. How can I do that? Is there an escape character for it?
For example:
|Code |Comment |
|-----|----------|
|a | b|Comment 1 |
Table:
Code | Comment |
---|---|
a | b |
But I want:
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.
Sign up to join this communityEscape it with a backslash? That works for many things in Markdown. Alternatively, use one of the HTML entities for the pipe character, e.g. |
(or the more meaningful |
as mentioned by @GalaxyCat105).
The following Markdown:
|foo|bar |
|---|------|
|\| |||
produces this:
foo | bar |
---|---|
| | | |
As the other answers have mentioned, you could escape it with a backslash, which is probably a better solution than mine, but you could also use the HTML entities |
or |
in place of the pipe character.
|Code |Comment |
|------|-----------|
|a | b | Comment 1 |
Code | Comment |
---|---|
a | b | Comment 1 |
The escape character you're looking for is a backslash:
|Code |Comment |
|---------|-----------|
| a \| b | Comment 1 |
This gives:
Code | Comment |
---|---|
a | b | Comment 1 |