Question

How can I put the @ sign in a comment without referring to a person?

I want to have six @ characters in a comment (ruby on rails variables), but when I try to do this, I'm getting an error about being unable to notify that many people in a single comment.

It seems that the workaround @ is not being replaced with an @ sign, either.

Was it helpful?

Solution

Use backticks:

`@@@@@@`

OTHER TIPS

Pekka has already given the correct solution when the "@" that you want to include is in a piece of code: use backticks.

I think it's important to mention that for other kinds of content, backticks are inappropriate, because they would mark a word or phrase as code in the resulting HTML, when it is not in fact code.

For those cases, using quotation marks would likely be the best choice. If that also seems inappropriate, you can perform a pseudo-escape of the at symbol by preceding it with any other character, like: "\@". The backslash is not actually significant: you can use any character you like (except possibly another "@") to prevent the software from interpreting the at symbol as an @mention. Note also that the pseudo-escape character will appear in the rendered comment.

My similar answer on Meta.SO, with demonstrations: Using @ sign in comments to call out users makes it difficult to discuss certain iOS topics

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top