A couple things

John Gruber gruber at fedora.net
Sun Mar 21 13:39:51 EST 2004

Byron <byron at texturadesign.com> wrote on 03/21/04 at 9:18a:

>  1. Not able to add a target="_blank" on links.

I despise `target="_blank"` behavior, so you might be out of luck
here. There is no way I'm ever going to add this to the official
Markdown link syntax. The only thing I can think of which I *might*
consider is allowing you to specify a link definition like this:

    I hate when [links][1] open in new windows.

    [1]: <a href="http://example.com" title="Title" target="_blank">

In other words, instead of the usual Markdown definition:

    [1]: http://example.com/ "Title"

you could use a real `<a>` tag to define the anchor. Not just for
`target` attributes, but for any attribute Markdown doesn't support

>  2. Not able to have more than one link on the same line.
> On the second one, this syntax doesn't work
> Last week, [Daring Fireball](http://daringfireball.net "daring") released
> [Markdown](http://daringfireball.net/projects/markdown/ "Mark it down")
> The second link is not rendered.

That's a bug, it'll be fixed in the next release, which I think will
come out late tonight or else tomorrow.

If you can't wait, the fix is around line 650, inside _DoAnchors(). You need to change this:

            (           # title = $4
              (['"])    # quote char = $5
              \5        # matching quote
            )?          # title is optional

to this:

            (           # title = $4
              (['"])    # quote char = $5
              \5        # matching quote
            )?          # title is optional

The only difference is the single `?` in the third quoted line. There's a similar fix in _DoImages().

(I can't give you the exact line number, because I'm away from my CVS
repository at the moment, and the line numbers have shifted a bit in
my copy of the code here.)

Thanks for the report.


More information about the Markdown-discuss mailing list