Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vertical bar symbol within a markdown table

Markdown tables use vertical bars as field separators, but I need to write a vertical bar within some cells. Is this possible? I'm using GFM (GitHub Flavored Markdown).

Can I escape the vertical bar somehow?

This is not on GitHub, it's through Docusaurus. I don't know which parser Docusaurus uses, but none of the following work:

  • | - | just gets displayed (the & is escaped)
  • <code> - Any html is displayed (the < is escaped)
  • \| - | still acts as a table cell delimiter

UPDATE:

&#124; works if I don't have it inside backticks. So, at least for now, I simply un-backtick the vertical bar. For example, a | b becomes a|b

like image 258
at. Avatar asked Apr 13 '18 04:04

at.


1 Answers

If you are typing math and $p(x|y)$ breaks the formula, use \vert instead of |.

like image 67
awct Avatar answered Oct 21 '22 11:10

awct