Markdown development

John MacFarlane jgm at
Fri Mar 5 22:18:58 EST 2010

+++ John MacFarlane [Mar 05 10 18:05 ]:

> +++ david parsons [Mar 05 10 22:10 ]:

> > In article <20100305211753.GA27237 at>,

> > John MacFarlane <markdown-discuss at> wrote:

> > >Currently big players like reddit and github

> > >use forms of markdown that depart significantly from John Gruber's

> > >official specification;

> >

> > Okay, I'm curious. Since I'm the writer of the "forms of markdown"

> > that reddit and github use, just exactly where does discount depart

> > significantly from JG's official specification?


> Oh, I didn't know that either of those sites used discount.

> Discount is, in my experience, extremely accurate (and extremely

> fast). But github uses a documented variant for some purposes

> (, and, as for

> reddit, I'm just going on my experience having posts there formatted

> incorrectly. I think one context where that happened was an inline

> code span with backslashes. According to John Gruber's specification, as

> I understand it,


> `a\`


> should render as


> <code>a\</code>


> but discount (at least the version on babelmark) renders it as


> <code>a\`</code>


> Similarly,


> `` a```a ``


> should render as


> <code>a```a</code>


> but discount renders it as


> <code>a</code><code>a</code><code></code>

Okay, looking back at the actual [spec]
I see that it was unfair of me to suggest that discount does
not satisfy it. The spec is just too vague. For example, it never says
explicitly that backslash escapes don't work inside code spans (though
perhaps that's implicit, since if backslash escapes worked, you wouldn't
need the more complex method of using multiple-backtick delimiters).
I guess my interpretation of it was influenced by seeing what actually does.

Indeed, in one respect, discount conforms to the spec for inline
code spans better than The syntax document says:
"The backtick delimiters surrounding a code span may include spaces — one
after the opening, one before the closing." I'd not noticed this
before, but this seems to say pretty unambiguously that there is
*one* optional space at each end., and all other
implementations except discount (and the most recent lunamark, which I
just updated), gobble any number of spaces at the beginning and end
of a code span.

Test case: ` hello `


PS. I've now fixed the problem with
`` this```case ``
in lunamark and peg-markdown.

More information about the Markdown-Discuss mailing list