Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I have an exception which contains backtick (`) characters. I can't find a way to escape the character from markdown so that I can show the message as normal text.

Exception marked as inline code with double backticks to preserve the singles in the content:
Unable to cast object of type '<JoinIterator>d__61`4[System.Data.DataRow,System.Data.DataRow,System.Int32,<>f__AnonymousType0`1[System.Int32]]' to type 'System.Collections.Generic.IEnumerable`1[System.Data.DataRow]'.

What happens if I don't do the above (markdown treats two of the three backicks as formatting commands):
Unable to cast object of type '<JoinIterator>d__614[System.Data.DataRow,System.Data.DataRow,System.Int32,<>f__AnonymousType01[System.Int32]]' to type 'System.Collections.Generic.IEnumerable`1[System.Data.DataRow]'.

share|improve this question
up vote 2 down vote accepted

This happened to me a few days back. See this post and its comments.

I think the short answer was to choose between using <pre> tags or escaping the backticks with backslashes.

Here are some backticks in text with pre:


Here are some backticks in memes with backslashes (it turns out this is another case of displays-right-in-preview-box-but-not-reality):
freehand circles```waffles!

Markdown for using pre:

share|improve this answer
But if you use <pre>, you have to escape angle brackets. – mmyers Dec 10 '09 at 15:17
Thanks. I could've sworn I tried escaping them before posting this though. Maybe I tried using the wrong slash.. – Dan Neely Dec 10 '09 at 16:28

You could format it as a code block:

Unable to cast object of type '<JoinIterator>d__61`4[System.Data.DataRow,System.Data.DataRow,System.Int32,<>f__AnonymousType0`1[System.Int32]]' to type 'System.Collections.Generic.IEnumerable`1[System.Data.DataRow]'.

Although admittedly, with a single long line like this, it's not very easy to read.

share|improve this answer
Yeah. Making it inline code so that I at least got to keep the word wrapping was the least unpleasant option I could find. – Dan Neely Dec 10 '09 at 14:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .