Reputation: 1725
Anyone know how to escape the @
character in markdown on BitBucket wiki? In my case @ is immediately followed by the word which happened to be someone's user name, i.e. @blahblah
. What I've tried so far:
\@
'@
&\#64;
but none of those works. Shielding is just ignored, and when I'm using a character code, it just outputs it as is.
Upvotes: 19
Views: 8143
Reputation: 24073
As @Mikalai mentioned here, you can put a "zero width space" character between the @
and the name. But I was having trouble following his instructions. It wasn't working for me.
Upvotes: 10
Reputation: 73
Our situation is related, a code snippet in Markdown with a JUnit test
```
@Test
public void testThis() throws Exception {
//
}
```
It renders with the @Test
annotation missing the @
but enclosed in a box.
----------------------------------------
Test
public void testThis() throws Exception {
//
}
----------------------------------------
I don't understand why inside a code block the @Test
is still interpreted as a user reference. I got around it by putting a space between @
and the Test
. It looks funny but gets the point across.
Upvotes: 3
Reputation: 1722
For those who didn't read the comment on the original question (like me initially):
"why would you need that outside a code block, which you can create with backticks like: `@foo`
" - mb21
Upvotes: 3
Reputation: 8716
It sounds strange, but you can insert an invisible character between @
and text (e.g. zero width space).
Upvotes: 13