How to escape angle brackets in wordpress.com compatible markdown within inline code

250 Views Asked by At

I would like to display /home/<user>/file as inline code within a free wordpress.com blog, which supports PHP Markdown Extra. However when I write

A **text** mentioning a `/home/<user>/file` path

in markdown, the <user> part disappears from the generated HTML blog post. This seems to be wordpress.com specific, because it doesn't happen here on SO. More specifically, it just happens when I write

  • inline code outside of a table or
  • a code block without a language annotation.

However, the following is ok (<user> appears in HTML):

  • inline code within a table
| Item       | Note |
|:-----------|:-----|
| `<user>` | ok   |
  • writing a code block
``html (with 3 backticks)
A **text** mentioning a `/home/<user>/file` path
``

with a language annotation.

I tried the usual escape variants like \<user\> and &lt;user&gt;, but they appear wrongly/literally in HTML.

So, how do I write angle brackets within inline code in markdown for WordPress?

0

There are 0 best solutions below