Reputation:
I had test "|" to express "|" in my github page's .md file 's table. but failed.
It just show "|" but no symbol '|",
Could any one help?
I want to show "|" in the table of .md file on github page. Much Thanks
Upvotes: 3
Views: 314
Reputation: 297
You can use HTML table tags to create a table in md file.
<table style="width:100%">
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
</table>
Result
Upvotes: 0
Reputation: 340
You need to follow | with a semicolon. Here's the example below:
FirstName | LastName | Phone | Email
--- | --- | ---
John | Doe | 99658545 | [email protected]
I have tested on GitHub and it works. I would like to share my experience that initially it did not work because i entered it after a list item. Then I added a blank line by hitting enter just before that table. It worked ! Hope it helps !
Upvotes: 2
Reputation: 97150
As noted in the documentation, you need to escape the pipe (|
) with a backslash (\
):
To include a pipe
|
as content within your cell, use a\
before the pipe:| Name | Character | | --- | --- | | Backtick | ` | | Pipe | \| |
Upvotes: 1