Closed fractaledmind closed 10 years ago
Thanks for taking the time to describe the problem and for suggesting a solution. I've merged a fix for the issue you've described. The latest version of ForMd should fix the problem. Let me know if you have any further issues. Thanks again!
The regular expression for finding links seems to be a bit loose.
For example, markdown text like this:
will match items thus:
[Apple CFO Peter Oppenheimer to Retire, Luca Maestri to Take Over][tmo1]
[PR Queen Katie Cotton Leaving Apple][tmo2]
[tmo1]: http://www.macobserver.com/tmo/article/apple-cfo-peter-oppenheimer-to-retire-luca-maestri-to-take-over [tmo2]: http://www.macobserver.com/tmo/article/pr-queen-katie-cotton-leaving-apple \n [I tweeted the two headlines and corresponding URLs][t]
[1]</sup> \n My point was to draw attention to the disparate job descriptions: "Apple CFO" vs. "PR Queen". \n [Julia Richert pointed to][j]
To tighten up the regex, I suggest the following change, which appropriately catches all markdown links, but only markdown links:
Clearly, the only real change is to add to the characters that cannot be within the linked text or in the reference id.