Fixed #26 -- Urls which contained matched parenthesis are now supported

This commit is contained in:
Titus 2012-08-09 20:06:58 -06:00
parent f68216820a
commit 541b3eccb1
3 changed files with 5 additions and 1 deletions

View File

@ -483,7 +483,7 @@ var _DoAnchors = function(text) {
)
/g,writeAnchorTag);
*/
text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,writeAnchorTag);
text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?(?:\(.*?\).*?)?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,writeAnchorTag);
//
// Last, handle reference-style shortcuts: [link text]

View File

@ -0,0 +1,2 @@
<p>There's an <a href="http://en.memory-alpha.org/wiki/Darmok_(episode)">episode</a> of Star Trek: The Next Generation</p>

View File

@ -0,0 +1,2 @@
There's an [episode](http://en.memory-alpha.org/wiki/Darmok_(episode)) of Star Trek: The Next Generation