Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show the pipe "|" symbol in Markdown table?

Tags:

markdown

I want to show a markdown table where one of cells has a pipe "|"

Column1 | Column2
------- | -------
  |     | hello 

Just doesn't work. How to escape the | in a table? I tried *|* also didn't work

like image 319
xiaodai Avatar asked May 18 '14 15:05

xiaodai


People also ask

How do you show a table in Markdown?

A table is an arrangement of data in rows and columns. To add a table in Markdown, use the vertical line | to separate each column, and use three or more dahses --- to create each column's header. A vertical line should also be added at either end of the row.

How do you escape characters in Markdown?

In Markdown, you can escape various characters using a backslash ( \ ), so if you wanted to type C#, you would use C\# .

How do I add a checkbox in Markdown?

In Markdown applications that support task lists, checkboxes will be displayed next to the content. To create a task list, add dashes ( – ) and brackets with a space ( [ ] ) in front of task list items. To select a checkbox, add an x in between the brackets ( [x] ).


2 Answers

This depends on your markdown interpreter. But in general markdown escapes with backslash (like markdown extra additional the pipe)

Column1 | Column2
------- | -------
 \|     | hello 

This works in markdown:

Column1 Column2
| hello
like image 183
klml Avatar answered Jan 04 '23 18:01

klml


You can use the HTML Entity

Column1 | Column2
------- | -------
|  | hello

Unicode Character VERTICAL LINE

like image 30
Zombo Avatar answered Jan 04 '23 20:01

Zombo