diff --git a/index.html b/index.html index 7613823..d25c49a 100644 --- a/index.html +++ b/index.html @@ -234,8 +234,12 @@ h1{ // Parse Markdown links in the text // credit: http://stackoverflow.com/a/9268827 var link = null; - while(link = d.text.match(/\[([^\]]+)\]\(([^)]+)\)/)) { - d.text = d.text.replace(link[0], "" + link[1] + ""); + while(link = d.text.match(/\[([^\]]+)\]\(([^)"]+)(?: \"([^\"]+)\")*\)/)) { + var link_attr = ""; + if (link[3] !== undefined) { + link_attr = " title='" + link[3] + "'"; + } + d.text = d.text.replace(link[0], "" + link[1] + ""); } return '