13

I've noticed that I can escape curly braces. That is, if I type \{, I get {. Why are curly braces special characters; what Markdown syntax uses them? I couldn't find anything about it in the editing-help page.

4
  • 7
    Because they are half of a free-hand circle.
    – GManNickG
    Nov 9, 2009 at 7:20
  • 1
    obligatory +1 for mentioning free hand circles
    – Amarghosh
    Nov 9, 2009 at 7:21
  • 4
    All good standards have things that are reserved for future use
    – beggs
    Nov 9, 2009 at 7:38
  • When one uses pandoc to add BibTeX citations to a Markdown document, it inserts some strings involving braces in a way that suggests pandoc expects Markdown to do something special with braces. No idea what that something special is, though. Jun 30, 2022 at 16:09

3 Answers 3

9

In at lease one extension to Markdown, something called PHP Markdown Extra, braces are used to add an id to a header:

So in that variant of Markdown, this code:

## Header 2 ##      {#header2}

Will produce markup like:

<h2 id="header2">Header 2</h2>

I don't see any reference to extensibility on the Markdown Documentation Page, but perhaps the curly braces and other characters are reserved for future use.

1
  • 2
    I guess "reserved for future use" is the best answer I'm going to get. Though the existing symbols are plenty for extensibility; if they need a new bracket, they could use !( for example. Nov 10, 2009 at 19:25
6

It's just part of Markdown - Markdown provides backslash escapes for the following characters:

\   backslash
`   backtick
*   asterisk
_   underscore
{}  curly braces
[]  square brackets
()  parentheses
#   hash mark
+   plus sign
-   minus sign (hyphen)
.   dot
!   exclamation mark

There's no mention of what special meaning { has anywhere on the syntax page for Markdown though.

0

The brace ({}) isn't special. But it don't do anything.

Not in this range: {0-9}.
Nor with this range: {aardvark-zebra}

The backslash (\) just looks like it's helping out escape punctuation marks just in case things are done with them.

Special ed maybe.

You must log in to answer this question.

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