houseabsolute / Markdent

An event-based Markdown parser toolkit
http://metacpan.org/release/Markdent/
Other
12 stars 13 forks source link

Be more forgiving of link mark-up with spaces? #12

Open autarch opened 6 years ago

autarch commented 6 years ago

Migrated from rt.cpan.org #92249 (status was 'open')

Requestors:

From pjf@cpan.org (@pjf) on 2014-01-18 03:49:19:

Markdent pareses [link text](url) just fine, but it thinks that [link text] (url) is a text chunk followed by an auto-link in paraentheses.

At least in github-flavoured-markdown, a space between the link title and the url is considered to be fine. I'm happy to send through a patch (or a pull request on github) to fix this, but I'd love to know if you'd want me to change it for all markdowns, or just GFM.

Many thanks for a great module!:D

~ pjf

autarch commented 6 years ago

From autarch@urth.org (@autarch) on 2014-01-18 04:31:33:

On Fri, 17 Jan 2014, PJF via RT wrote:

At least in github-flavoured-markdown, a space between the link title and the url is considered to be fine. I'm happy to send through a patch (or a pull request on github) to fix this, but I'd love to know if you'd want me to change it for all markdowns, or just GFM.

The Markdown spec at http://daringfireball.net/projects/markdown/syntax#link says "[t]o create an inline link, use a set of regular parentheses immediately after the link text’s closing square bracket."

I think that "immediately" suggests that space shouldn't be accepted, but I'd happy to accept a patch that adds this to the GFM dialect.

Thanks,

-dave

/============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================/