Markdown not escaping link id

John Gruber gruber at fedora.net
Tue Oct 12 12:30:54 EDT 2004


Andy Fragen <lists at thefragens.com> wrote on 10/11/04 at 9:11pm:

> I want to show what my pre-Markdown rendered code looks like so I put it
> all after 4 spaces. That should give me a <pre><code> block. Everything
> renders, or doesn't render fine, except for the line..
> 
>     [1]: http://daringfireball.net
> 
> It doesn't work in the dingus either. Any ideas?

Right now, this is ambiguously defined in the syntax.

The way I do this in the docs for Markdown is to write example link
definitions like this:

    \[1]: http://example.com/

So, the question is, if you indent a link definition by a tab (or 4
spaces), should that be enough to make it a code block?

My gut feeling is that yes, it should. And that the rule for link
definitions would thus be that they must start within three spaces
of the left margin:

[1]: http://example.com  "This is a link def"

 [1]: http://example.com  "This is a link def"
 
  [1]: http://example.com  "This is a link def"
  
   [1]: http://example.com  "This is a link def"
   
    [1]: http://example.com  "This is part of a <pre><code> block"


The only reason it doesn't work this way is that I thought perhaps
some people would like to indent their link defs, to make them stand
out from regular paragraphs. I think people who do this will have to
make do using two or three spaces, however.

-J.G.


More information about the Markdown-discuss mailing list