Abu Shoeb
Abu Shoeb

Reputation: 5152

Include a pipe | as content in table in Git Readme.md file

I'm using Gitlab and trying to include a pipe | sign as content within the table in the README.md file. I followed the example showed here but the output is not the expected one. Any other ways to do it?

README contents

| Name     | Character |
| ---      | ---       |
| Backtick | `         |
| Pipe     | \|        |

My Output

README Table with pipe

Expected Output

README Table with pipe expected

Also, how can I use pipe in a codeblock like this:

| Name         | Command   |
| ---          | ---       |
| Show Files   | `ls`      |
| Grep History | `history | grep pip`| 

Upvotes: 1

Views: 1196

Answers (1)

Josh Adams
Josh Adams

Reputation: 2099

You can use the html code without the space between & and #

& #124;


| Name     | Character |
| ---      | ---       |
| Backtick | `         |
| Pipe     | |    |

Your answer to the second part per our comments would be:

| Grep History | <code>history &#124; grep pip<\code>| 

Upvotes: 2

Related Questions