How to escape "}}" in code block?

Feb 24, 2010 at 6:41 PM
Edited Feb 24, 2010 at 6:43 PM


I want a literal "}}" to appear within a code block in my project's documentation. Is there any way to escape this sequence such that the parser does not think I'm ending the code block?

I can imagine this is quite a frequent problem, given that XAML uses '{' and '}' to delimit markup extensions, and markup extensions can be used within markup extensions. For example:

<Button Content="{Binding SomeProperty, Source={StaticResource SomeResource}}"/>

The above code block would "break" the parser because of the two '}' characters. I've had to insert a space between them in order for it to work, which is not ideal.


Feb 24, 2010 at 8:22 PM

Hi Kent,

How about using {code:xml} ... {code:xml} instead of {{ ... }}

This way you get color coding & it doesn't freak out when it sees }}